Solved

Importing a SQL Server 2000 Table

Posted on 2002-03-21
7
535 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

760 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