Solved

Importing a SQL Server 2000 Table

Posted on 2002-03-21
7
538 Views
Last Modified: 2012-06-21
I want to import an SQL table into Access 97 in code and I keep getting an error "Could not find installable ISAM". If I import through the menu, i.e. File, Get External Data, Import it works. The code to import the table is below:

    DoCmd.TransferDatabase acImport, "ODBC", "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Neve;Data Source=2000SERVER\SERVER2000", acTable, "studdet", "studdetnew", False

Nainey
0
Comment
Question by:nainey
7 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 6885214
why are you IMPORTING the table into your Access DB.  I would suggest that you LINK the SQL Server Table into your Access DB. That way, any new data ADDED or CHANGED in the SQL Server Table is automatically available to you in your Access Database, without you having to import the data again.

A LINKED table looks, to your application, EXACTLY like any other local table.

If you are not familiar with LINKED tables, then just ask for more information.

0
 
LVL 7

Expert Comment

by:Nosterdamus
ID: 6885434
Hi nainey,

Either case (import or link), you should first define an ODBC connection via "Control Panel-> ODBC 32 Bit". Make sure that you create a file DNS connection rather than a system DNS connection.

HTH,

Nosterdamus
0
 
LVL 5

Expert Comment

by:KMAN
ID: 6886437
Why the File DSN vs. System DSN?
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:nainey
ID: 6891976
Nosterdamus,
I have already defined a file DSN ans it is still not working!
0
 

Author Comment

by:nainey
ID: 6891978
Arthur Wood,
I am familiar with Linked tables and already use them, but this table has to be imported because I specifically do not want the changes made to be automatically updated. Anyway, how can I link the table through code - if I just chnage acImpoprt to acLInk I get the same error.
Thanks
Nainey
0
 

Accepted Solution

by:
kellykln earned 100 total points
ID: 6893431
You probobly don't have the connection string right. In order to get the correct connection string go into design view of the linked table, right click look at properties, description and you'll see the correct connection string. Paste that into your code. Here is what it should look like:
ODBC;DSN=MyServer;Description=SomeDB;APP=Microsoft® Access;WSID=MYID;Trusted_Connection=Yes;TABLE=dbo.MyTable

Make sure that you have the proper permission on the server.
 
Cheers!
0
 

Author Comment

by:nainey
ID: 6893455
Indeed my connection string was wrong. Thanks
Nainey
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

910 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

19 Experts available now in Live!

Get 1:1 Help Now