|
-
Jan 23rd, 2000, 03:56 AM
#1
Thread Starter
Member
I have a question ok i have a database i want to be created at run time how do i go about doing that in the program its a personal inventory so it has to be saved evertime things are added and updated so if any of you could help me that would be great
-
Jan 23rd, 2000, 04:16 AM
#2
Guru
-
Jan 23rd, 2000, 05:06 AM
#3
Thread Starter
Member
i use the data control in the other databases i dont know much about the differant types. But i do know what i want it to do. the database that will be used could be viewed in its own form with a datacontrol hopefully. I hope im not confusing you but im not the best at vb
-
Jan 23rd, 2000, 06:45 AM
#4
Guru
You're probably using DAO. Here is an example that creates a database, a table, and two fields.
Code:
Dim db As Database
Dim tbl As TableDef
'create the database
Set db = DBEngine.CreateDatabase("C:\test.mdb", dbLangGeneral)
'create table object
Set tbl = New TableDef
tbl.Name = "New Table"
'add fields to table
tbl.Fields.Append tbl.CreateField("TestField", dbText, 100)
tbl.Fields.Append tbl.CreateField("AnotherField", dbText, 50)
'add the table to the database
db.TableDefs.Append tbl
'close database
db.Close
Set db = Nothing
HTH
Tom
-
Jan 23rd, 2000, 06:54 AM
#5
Thread Starter
Member
ok thats kinda how i did it but i have one more question.
I would like to copy one row from one database and control and form to another database and control and form any idea on how i can do this?
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|