PDA

Click to See Complete Forum and Search --> : How do u customize a Database? (PLZ HELP!)


jgomes
Jul 9th, 1999, 01:55 PM
I got someone to tell me how to create a database. Now I need info, on how to really make one. I have no idea how to create tables, records, and everything else. I'm a newbie in Databases. (At least I
m good in everything else =])
Plz post infomation, even if someone posted already. Anything is good =].

Thx!

Justin =]

ScottF
Jul 9th, 1999, 04:19 PM
I hope this Helps
Dim db As Database
'dtaDataN.Recordset.AddNew
dlgCMD1.DialogTitle = "Microsoft Access"
dlgCMD1.FilterIndex = 1
dlgCMD1.Filter = "Microsoft Access MDBs (*.mdb)|*.mdb"
dlgCMD1.filename = vbNullString
dlgCMD1.CancelError = False
'Form1.dlgCMD1.Flags = FileOpenConstants.cdlOFNOverwritePrompt + FileOpenConstants.cdlOFNHideReadOnly
dlgCMD1.ShowSave
If Len(dlgCMD1.filename) > 0 Then
snewname = dlgCMD1.filename
lblDataN = dlgCMD1.filename

End If

If Len(snewname) = 0 Then Exit Sub


Set db = CreateDatabase(snewname, dbLangGeneral , dbVersion30)
db.Execute "Create Table NAmeOfTable " & " (ID TEXT,FirstName text, MiddleName text, Lastname text, SocialSecNo number);"
db.Close

ScottF
Jul 9th, 1999, 04:24 PM
New Version had a couple of line in there that mat have confuse you. As for as index and the rest I still try to figure that out.
Dim db As Database
dlgCMD1.DialogTitle = "Microsoft Access"
dlgCMD1.FilterIndex = 1
dlgCMD1.Filter = "Microsoft Access MDBs_ (*.mdb)|*.mdb"
dlgCMD1.filename = vbNullString
dlgCMD1.CancelError = False
dlgCMD1.ShowSave
If Len(dlgCMD1.filename) > 0 Then
snewname = dlgCMD1.filename
End If
If Len(snewname) = 0 Then Exit Sub


Set db = CreateDatabase(snewname, dbLangGeneral , dbVersion30)
db.Execute "Create Table NAmeOfTable " & " (ID TEXT,FirstName text, MiddleName text, Lastname text, SocialSecNo number);"
db.Close

jgomes
Jul 10th, 1999, 01:11 AM
Thx for the help! =]

Took me a while to figure out when I can declare comething a database. U need the Data object. =]

Thx for ur help.

Justin