Solved

Import  table

Posted on 1998-07-27
4
219 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

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
point in time restore in SQL server 26 43
Can I skip a node in XML? 9 32
T-SQL: Stored Procedure Syntax 3 31
T-SQL: Need Group By to use "fuzzy logic"?? 3 18
Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

756 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