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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This code used to work but now it doesn't any assistance appreciated.

Status
Not open for further replies.

other3

Programmer
Jul 30, 2002
92
US
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/currentMag.asp, line 55

objConn = Server.CreateObject("ADODB.Connection");
objConn.ConnectionString = "DSN=pb.dsn";
objConn.Open(); (line 55)

I have a Visual C++ app. that uses this same DSN which is a system DSN. If have MDAC 2.6 installed and am running everything on Win2K. The coded aboved worked until I screwed up and had to do a reinstall of the OS and everything. The Visual C++ app. still works.

Charlie

 
Make sure the name of the system DSN is "pb.dsn" not just "pb". You may also need to reboot after you have set it up.

Alternatively, use a DSN-less connection

Hope this helps,

BDC.
 
The only difference between when it worked and now is that
I had to total reinstall Win2K and set everything up again.
The DSN=pb is correct. I have a Java app. that uses it via
ODBC with no problem. I also have a Visual C++ app. that behaves as it should. It's something with ADODB that I haven't a clue about. Thanks if you think of anything else, please let me know.

CPB.
 
Hi

Try the following code, as you may have guessed replace table name with the table that you want to open

<%
dim RS
set RS=Server.CreateObject(&quot;ADODB.Recordset&quot;)
RS.open &quot;table name&quot;, &quot;DSN=pb&quot;

then what you want to do with this recordset
%>

Also is the DSN a system? I have been told it is best to use a System DSN so the dsn is open to all users.

hope this helps
Geo
 
Everything that everyone has sujected has been done. It is a system DSN, which can be accessed via a Java App. I think there is something having to do with ADODB that I don't know about. Am going to set up an XP partition and try things there. If anyone thinks of something please let me know. It would bug the .. outta you, wouldn't.

CPB
 
Have just installed Personal Website on Win '98 and the code works fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top