Groups | Blog | Home
all groups > sql server odbc > july 2003 >

sql server odbc : Converting an SQL server table structure to an MS-Access table


Andrew Chalk
7/14/2003 1:23:51 PM
I want to take an existing MS-SQL Server table in an SQL Server database and
create an MS-Access table with the same structure. Is there a standard
utility to do this?

Many thanks.

Mary Chipman
7/14/2003 2:54:56 PM
Usually people are wanting to go the other way, from Access to SQLS.
No, there's no utility that I know of, but there's a couple of ways
you can go about it. You can create an Access database and link to the
SQLS one, then create a Make Table query. You'll need to manually put
in keys, indexes, and constraints as validation rules. A second way
would be to create a script using SEM's recording capabilities. You
could then revise it so that it is compatible with Access/Jet DDL. A
third way would be to use DAO, but you'd need to write the code.

-- Mary
Microsoft Access Developer's Guide to SQL Server
http://www.amazon.com/exec/obidos/ASIN/0672319446

On Mon, 14 Jul 2003 13:23:51 -0500, "Andrew Chalk"
[quoted text, click to view]
Andrew Chalk
7/15/2003 12:16:45 PM
Thanks. However, I need a programatic solution.

At the moment I copy an empty MDB to the target directory and then open the
SQL Server and Access dbs as ODBC data sources and SELECT and INSERT each
record in turn.

Regards.

[quoted text, click to view]

Matt Smith
7/15/2003 2:05:33 PM
[quoted text, click to view]

It isn't perfect but you could try using Microsoft Data Transformation
Services Wizard ("<SQL 7 Install Dir>\Binn\dtswiz.exe"). It comes with any
version of MSDE.

Matt

AddThis Social Bookmark Button