little example database... 
Author Message
 little example database...

?????

Is there someone who knows how to create a database?
or can give me a database example...?

PLEAAAAAAAAAAAAAAAASSSEE HELP ME!

  mto



Wed, 26 Dec 2001 03:00:00 GMT
 little example database...

Well, you can create one very easily with MS Access. Also, check out these
links
http://www.amundsen.com/books/tysdbvb5/default.htm

http://www.itlibrary.com/reference/library/067231018x/index.htm

----------------------------------------------------------------------------
--------
Is there anybody out there?
----------------------------

Oscar A. Ross Gurrola

Este Lauder Cosmticos de Mxico
Departamento de Sistemas
----------------------------
Please remove "nospam" from e-mail address to reply.
Por favor, remover "nospam" de la direccin de correo para contestar.
----------------------------------------------------------------------------
--------

ICQ: 21657696
AIM: Oaross


Quote:

>?????

>Is there someone who knows how to create a database?
>or can give me a database example...?

>PLEAAAAAAAAAAAAAAAASSSEE HELP ME!

>  mto




Wed, 26 Dec 2001 03:00:00 GMT
 little example database...


Quote:

> ?????

> Is there someone who knows how to create a database?
> or can give me a database example...?

> PLEAAAAAAAAAAAAAAAASSSEE HELP ME!

>   mto


This code should create database (database.mdb), witch contains table
Machinery and at that table there is some fields.

U'll need these to the general part.

Dim db As Database
Dim tblDef As TableDef
Dim fldDef As field
Dim dbName As String

Public Sub create_data()

On Error GoTo errDebug

    dbName = "database.mdb"

Screen.MousePointer = vbHourglass

If (Len(Dir(dbName))) Then
  Kill dbName
End If

Set db = DBEngine.Workspaces(0).CreateDatabase(dbName, dbLangGeneral)

'create tables to database
Call createMachineryTable

MsgBox ("Database successfully created and saved")

Screen.MousePointer = vbDefault

errDebug:
    Exit Sub

End Sub

Public Sub createMachineryTable()

'-- Create the Contact table here --
Set tblDef = db.CreateTableDef("Machine")

'-Create the fields in the machinery table --

Set fldDef = tblDef.CreateField("Machine", dbText, 50)
tblDef.Fields.Append fldDef
fldDef.AllowZeroLength = True

Set fldDef = tblDef.CreateField("Model", dbText, 50)
tblDef.Fields.Append fldDef
fldDef.AllowZeroLength = True

Set fldDef = tblDef.CreateField("Pieces", dbText, 50)
tblDef.Fields.Append fldDef
fldDef.AllowZeroLength = True

Set fldDef = tblDef.CreateField("LocationInTheEnterprice", dbText, 50)
tblDef.Fields.Append fldDef
fldDef.AllowZeroLength = True

db.TableDefs.Append tblDef

End Sub




Sat, 29 Dec 2001 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Little example for database support in ATL ?

2. Database of database examples

3. Delphi BDE and QBE example (IE: Using Query By Example instead of SQL)

4. DSN-Less to access97 database using workgroup security

5. user meta (to the database, at least) information

6. Insert image to database with DSN less method

7. Replicating Master database (or at least user logons)

8. Database File Size - big size little info

9. How to -- create a completely unbound database design with Access ADP (DSN-less connections)

10. Database Device Size Less Than zero problem

11. least used database in SQL

12. DSN-less connect to database located on internet


 
Powered by phpBB® Forum Software