DSN Error

J

JW

Hello. I am getting the error listed below on a page in my site, only there
is no line 149. (it stops at 125).

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified
/muskyfestcontestants.asp, line 149

The link to the page is:
http://www.willsnorthwoodsinn.com/muskyfestcontestants.asp
As you will see in the code listed below, I placed a response.write before
opening the connection to see the value. My dsn on my site (hosted with
godaddy) is ws-dmwnicom.data1 which works fine on other pages (ex:
http://www.willsnorthwoodsinn.com/willsupcomingevents.asp) that were
programmed with frontpage, so I know the dsn connection works. Thanks

Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "Dsn=ws-dmwnicom.data1"
Response.Write conn
conn.Open
Dim strSQL, rs, hlink, curpict, curgbd
strSQL = "Select contestant, contestantid, imagename, guestbartendingdate
from muskyasc"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, conn
do while not rs.EOF
 
S

Stefan B Rusynko

Check Tools Site Setting database to verify your DSN connection
Then see your global.asa for a value like this:
Application("ws-dmwnicom.data1_ConnectionString")

Then Try

Dim DSN_Name, conn
Dim strSQL, rs, hlink, curpict, curgbd
Set conn = Server.CreateObject("ADODB.Connection")
DSN_Name = Application("ws-dmwnicom.data1_ConnectionString")
conn.Open DSN_Name
strSQL = "Select contestant, contestantid, imagename, guestbartendingdate from muskyasc"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, DSN_Name
do while not rs.EOF

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Hello. I am getting the error listed below on a page in my site, only there
| is no line 149. (it stops at 125).
|
| Microsoft OLE DB Provider for ODBC Drivers error '80004005'
| [Microsoft][ODBC Driver Manager] Data source name not found and no default
| driver specified
| /muskyfestcontestants.asp, line 149
|
| The link to the page is:
| http://www.willsnorthwoodsinn.com/muskyfestcontestants.asp
| As you will see in the code listed below, I placed a response.write before
| opening the connection to see the value. My dsn on my site (hosted with
| godaddy) is ws-dmwnicom.data1 which works fine on other pages (ex:
| http://www.willsnorthwoodsinn.com/willsupcomingevents.asp) that were
| programmed with frontpage, so I know the dsn connection works. Thanks
|
| Dim conn
| Set conn = Server.CreateObject("ADODB.Connection")
| conn.ConnectionString = "Dsn=ws-dmwnicom.data1"
| Response.Write conn
| conn.Open
| Dim strSQL, rs, hlink, curpict, curgbd
| strSQL = "Select contestant, contestantid, imagename, guestbartendingdate
| from muskyasc"
| set rs = Server.CreateObject("ADODB.Recordset")
| rs.Open strSQL, conn
| do while not rs.EOF
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top