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

My file DSN doesn't work anymore

Status
Not open for further replies.

JScannell

Programmer
Jan 9, 2001
306
0
0
US
I had to re-install Windows 7 and all of my other software because of a virus corruption.

I have a real tough problem now that I can't seem to fix.

I have Office 2007 (and consequently Access 2007).

I have an intranet website that I had to re-enab le after doing the install of ev erything and the website doesn't recognize the file dsn anymore.

I've reached the end of my rope, so maybe somebody knows what I need to do.

Here's the file dsn contents:
[ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
UID=admin
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=MS Access
DriverId=25
DefaultDir=C:\Inetpub\DBQ=C:\Inetpub\
Here's my connection string setup:
Session( "strOLEDB" ) = "filedsn=c:\inetpub\ Session("strProvider") = Session("strOLEDB")

Here's my dbOpen function:
function openConnection ( indexCol )
' response.write Session("strServerName") & "<BR>"
' response.write Session("strProvider")
' response.end

openConnection = dbOpen( indexCol, Session( "strProvider" ) )
end function

Here is the output of my special db error handler with the error particulars:

While Running the procedure this problem occured--------------------------------------------------------------------------------
UPDATE_query. db Connection Error
Error Number = -2147467259
NativeError = 0
Description = [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
SQLState = IM002
Source = Microsoft OLE DB Provider for ODBC Drivers

Any help that you can provide would be huge.

Thanks in advance,

Jerry Scannell
 
Yes it is ASP. The link you provided to the Microsoft page proved to me that I am attempting to open the connection the correct way. Note my code:

Session( "strOLEDB" ) = "filedsn=c:\inetpub\Session("strProvider") = Session("strOLEDB")

Here's my dbOpen function:
function openConnection ( indexCol )
' response.write Session("strServerName") & "<BR>"
' response.write Session("strProvider")
' response.end

openConnection = dbOpen( indexCol, Session( "strProvider" ) )
end function


The question is why am I getting the error that I am getting when I am correctly referencing the file dsn?

Jerry Scannell
 
Don't know, just to me your connection code looks nothing like this
Code:
<% Set Cnn = Server.CreateObject("ADODB.Connection")
Cnn.open "FILEDSN=ADSN"
%>

The error says : Data source name not found and no default driver specified

But I didn't think you were using a DSN, well not an ODBC registered DSN you were using a FILEDSN, it seems it is not picking up the details in the file.

Are you sure you have the path right, filename, and the server can access the location?

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Dance Music Downloads
 
Hmmmm. "...and the server can access the location?"

What do I need to do to make it so the server can access it? What server? IIS or maybe MS Access? Could it be something with permissions on either the main folder of the website or the _database folder: c:\inetpub\ If so, then let me know and I will try it.

Thanks in advance,

Jerry Scannell
 
Yes what ever user IIS is running the ASP under IUSR perhaps? you need to make sure the user has access permissions to the folder the DSN resides and the DSN file itself.

Also is the JET Driver installed on your Win7 machine?



"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Dance Music Downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top