Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connecting to the sql server from Access

Status
Not open for further replies.

JazzMan2

Programmer
Jul 1, 1999
9
US
I have been trying to connect to the sql server in access. I tried doing a connection string in ADO, RDO, and DAO, and I just couldn't get them to work. <br>
<br>
<br>
If anyone can help, I would appreciate it. <br>
<br>
thanks,<br>
JazzMan
 
Have you tried setting up an ODBC connection in your System DSN? That usually does the trick for me.<br>
<br>
HTH,<br>
<br>
MapMan
 
If SQL server is on a different maching, using the network, you have to configure it to use the same protocol your PC is using. TCP/IP is preferred. Your Client must be setup with the Client Utilities, and with the same protocol in the Network tab, as well as the Client Configuration.<br>
You also still have to setup an ODBC connection in Control Panel as mentioned. <br>
<br>
Check that your username is created in SQL, and that you have permissions on the table, or if you're the "sa" then you don't have these problems.<br>
<br>
After that, its merely a case of linking the table in Access with "Get External data", using "Files of Type: ODBC"<br>
<br>
<br>
<br>

 
Hi,<br>
<br>
Why not try slowly to find yopur problem:<br>
<br>
1) try and ping the server, on a command line, that sql server is running on.<br>
If this succeeds:<br>
2) try and use odbcping.exe - an exe available on the server that is running your sql server installation. Copy this to your local machine (its handy!). Then from a command line type: odbcping -S [servername] -U sa -P [password]. What this does is, log in and out of sql server.<br>
<br>
If this works fine, then it is your connection string. Look up the help on the opendatabase method of DAO or adoconnection object. <br>
<br>
Try a DSN-less (no ODBC DSN) and a system DSN (as advised above)<br>
<br>
Let me know if I'm not clear.<br>
<br>
C
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top