Creating Access Data Table

JesseH

Active member
Joined
Feb 9, 2006
Messages
42
Location
Sugar Land, TX
Programming Experience
10+
We need to "create" an MS Access data table from within VB.Net without defining fields much like a "make table query" in MS Access. The reason for this is so that we can convert MS Access application to VB.Net gradually. We are seeking to create a table in VB.Net copy this table together with its structure to MS Access and make the source of the data transparent to the MS Access users.

I know that a table can be created by defining fields, but this solution would not work for us.

Any help would be greatly appreciated.

Using VB.Net 2003

Thanks
 
ADO.NET can run a SELECT ... INTO query without any problems, and this is the only way to create a table without using ADOX or DDL queries. What problem do you have using this form of query?
 
We were able to create a table by copying the colums, using

RARDetail = New DataTable("RARDetail")
Dim CustNo As DataColumn = New DataColumn("CustNo")

Not elegant, but it works. Thanks for the help
 
Your answer doesnt seem to relate to the question being asked; this creates a DataTable, not a database table?

However, if your app is working as expected then it's not so bad of a solution; you could make it a strongly typed table, and also there exists a method to Clone() a DataTable without copying the data
 
Back
Top