Solved

Import  table

Posted on 1998-07-27
4
222 Views
Last Modified: 2012-05-04
How can I import table from Access to SQL Server in VB code?
0
Comment
Question by:Boolean
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
I have a large data set and a SSIS package. How can I load this file in multi threading?
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to shrink a transaction log file down to a reasonable size.

742 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