By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 949 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

How to create a new table at runtime

Talihomz
P: 11
Hi.I was making a program that gets a clients id number and uses it to create a new record,named by a clients id.How do i create a Visdat table at runtime.Am using the ADO object to control the database.
Feb 3 '08 #1
Share this Question
Share on Google+
8 Replies


lotus18
100+
P: 866
Hi.I was making a program that gets a clients id number and uses it to create a new record,named by a clients id.How do i create a Visdat table at runtime.Am using the ADO object to control the database.
What database are you using? Why don't try using Create keyword?

Rey Sean
Feb 3 '08 #2

Talihomz
P: 11
Am using Visual Data or rather the mdb database format.How do i use create
Feb 3 '08 #3

debasisdas
Expert 5K+
P: 8,127
You are trying to create a new table or new record in existing table ?
Feb 4 '08 #4

Talihomz
P: 11
Am trying to create a new table.Wat i mean is that for instance an existing table has client information like names,age,id number n other many details.This table is in another location lets say General Records folder.I want to create a table for each client that holds data in fields such as Date Logged On or Transaction Performed.The table for each client is created everytime a new client is registered and is on another location Client Data.How do i create the new tables for each client since each client can log on as many ties as possible?
Feb 4 '08 #5

debasisdas
Expert 5K+
P: 8,127
You need to use ADOX .
Feb 5 '08 #6

Talihomz
P: 11
Can you please xpound more on tha ADOX.Do you mean the ADO component.How do i use it?
Feb 5 '08 #7

dnb
P: 34
dnb
Hi!!!!
Try This query

Private Sub Form_Load()

Dim mqry As String
mqry = "create table tablename(fieldname1 fieldtype,fieldname2 fieldtype)"
cn.BeginTrans
cn.Execute mqry
cn.CommitTrans

End Sub
Feb 5 '08 #8

debasisdas
Expert 5K+
P: 8,127
Can you please xpound more on tha ADOX.Do you mean the ADO component.How do i use it?
Please find a related discussion here .
Feb 5 '08 #9

Post your reply

Sign in to post your reply or Sign up for a free account.