Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create local Access table from SQL table

Status
Not open for further replies.

ggoldberg

MIS
Feb 7, 2003
27
I would like to create an Access table with the same structure as it's corresponding table in my SQL database. Is there someway I can query an SQL table so that I can build one of the same structure using VBA?
 
You'll probably want to use the information schema views.

Select * from Information_Schema.Columns

Or

Select * from Information_Schema.Columns Where Table_Name = 'blah'

The data types between the 2 databases are not the same, so you'll need to deal with those issues.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
How about using DTS to create the table and copy data from SQL Server to Access?

Jim
 
If the amount of data in the sql table isn't an issue have you considered just doing an import of the table in Access, and then truncating the data it has imported?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top