Solved

Import  table

Posted on 1998-07-27
4
213 Views
Last Modified: 2012-05-04
How can I import table from Access to SQL Server in VB code?
0
Comment
Question by:Boolean
4 Comments
 
LVL 2

Expert Comment

by:threshold
ID: 1089247
VB5.0 or VBA in Access?
0
 
LVL 9

Accepted Solution

by:
cymbolic earned 50 total points
ID: 1089248
Using VBA, you can attach the SQL Server table(s) to your .mdb, and use DAO commands and INSERT INTO SQL... to do the work.

Or, under VB, you can define both the .MDB and the SQL Server database to your app using a DSN for each, then use either DAO or if enterprise version RDO, or ADO, or you also can use a combination of DAO from the .MDB, and you can use SQL insert statements you form from reading the input table, and process into SQL Server using RDO, ADO, or you can  use the SQL Client Object SQL-DMO by including it as a reference in your VB Project.  

Also, you can download uopsizing tools from the Microsoft site that will get your tables and data up to a SQL Server.  The real problem is that there are too many ways to do it!

I am primarily writing and supporting migration systems at this time, doing a lot of migrating of tables from Access .mdbs to SQL server.  Because it is not a simple one for one process, and we need to build cross references in the process, we use VB 5.0 Enterprise edition, ODBC to the .MDB and SQL server, and RDO to read in resultsets from the MDB and insert statements and the .execute method of RDO to create records on the SQL Server Database.  Works as good as nay other method, but you need at least VB 5.0, RDO 2.0, Access 97 (Ver 8.0) to get software that doesn't have so many memory leaks that the process will stop

0
 

Author Comment

by:Boolean
ID: 1089249
I'm using VB5.0, Thanks!
0
 
LVL 1

Expert Comment

by:mativare
ID: 1089250
In MSSQL server 7.0 beta you can use data transformation services to import data it is windows based, fast and handy
you can select multiple tables. I do not know it is challenging
but perhaps it can replace this heavy job cymbolic is doing.
Put still we need to create tables firs with code, if we import into new table we loose indexes and relationships.


0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MS SQL with ODBC 5 36
SQL Help 27 45
string fuctions 4 26
access query to sql server 3 20
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question