Forum Moderators: open

Message Too Old, No Replies

Dns-less connection..Help

Dns-less connection

         

wweidner

7:22 pm on Jun 7, 2004 (gmt 0)

10+ Year Member



First of all hello to everyone, I am new to posting things like this, please be understanding.

I am trying to make a dns-less connection (first time trying this) for a website that i am building and everything that I have tried is not working. It is telling me that my connection is no good. Here is the code:

set connection = Server.CreateObject("ADODB.Connection")
fakeDSN="DRIVER={Microsoft Access Driver (*.mdb)}; "
fakeDSN=fakeDSN & "DBQ=" & Server.MapPath("data/backend.mdb")
connection.Open fakeDSN
function EncodeThisText(text)
if(instr(text, "'")) then
text = replace(text, "'", "'")
elseif(instr(text, """")) then
text = replace(text, """", """)
end if
EncodeThisText = text
end function

This is the error that i am getting:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xbd0 Thread 0xad0 DBC 0x205c0b4 Jet'.

/includes/connection.inc, line 5

I can not make heads or tales of what is wrong, i have change things and even talked to the server to make sure the permissions are set to "write".

defanjos

7:35 pm on Jun 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld

Try:
fakeDSN=fakeDSN & "DBQ=" & Server.MapPath("/data/backend.mdb")

Instead of:
fakeDSN=fakeDSN & "DBQ=" & Server.MapPath("data/backend.mdb")

wweidner

8:08 pm on Jun 7, 2004 (gmt 0)

10+ Year Member



It is still giving me the same error. Thank you for the welcome

defanjos

9:57 pm on Jun 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not sure if it is the same error, but read this thread [webmasterworld.com]

Spooky

11:43 pm on Jun 7, 2004 (gmt 0)

10+ Year Member



Use OLEDB

fakeDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("data/backend.mdb")

You are sure the path is correct?

wweidner

2:33 am on Jun 10, 2004 (gmt 0)

10+ Year Member



I have try alot of different things and I still can not get this code to work....it is giving me a runtime error now.

Spooky

8:33 pm on Jun 10, 2004 (gmt 0)

10+ Year Member



The error is? :)

wweidner

2:59 pm on Jun 16, 2004 (gmt 0)

10+ Year Member



I got this problem fixed...i had posted the other problem hich also got fixed....THank you for asking