Solved

Import  table

Posted on 1998-07-27
4
202 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
Comment Utility
VB5.0 or VBA in Access?
0
 
LVL 9

Accepted Solution

by:
cymbolic earned 50 total points
Comment Utility
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
Comment Utility
I'm using VB5.0, Thanks!
0
 
LVL 1

Expert Comment

by:mativare
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article—a derivative of my DaytaBase.org blog post (http://daytabase.org/2011/06/18/what-week-is-it/)—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how the fundamental information of how to create a table.

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now