
April 27th, 2003, 01:31 PM
|
|
Junior Member
|
|
Join Date: Apr 2003
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Data source name not found error
Hi,
I have a problem with my ASP page.
Everything works fine on my PC using IIS.
When I upload everything to the webserver and check it, I get the following error:
ADODB.Connection.1 error '80004005'
SQLState: IM002
Native Error Code: 0
[INTERSOLV][ODBC lib] Data source name not found and no default driver specified
/newsite/loadpage.asp, line 61
My code is as follows.
PHP Code:
Dim oRS
Dim collects
dim returnString
if request.querystring("nbr") = "" then
Session("nbr") = 1
else
Session("nbr") = request.querystring("nbr")
end if
returnString = "<div name=""moveBack"" style=""background-color: transparent; border: Black; width: 164; height: 32; background-image: url(images/linkbutton.gif);color:white; text-align: center; vertical-align: baseline; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-style: normal; font-size: xx-small; padding-top: 8;"" onClick=""moveBack();"">Back</div>"
Set oRS = Server.CreateObject("ADODB.Recordset")
if oConn.State = adStateClosed then
oConn.Open sConn
end if
oRS.Open "SELECT * FROM [" & sTableName & "] WHERE filter = '" & Session("filter") & "' AND seqnbr >= " & Session("nbr") & " AND seqnbr <= " & Session("nbr") + 10 & " ORDER BY Name" , oConn, 2, 3
If not oRS.EOF Then
Session("Count") = oRS("filterCount")
Do While Not oRS.EOF
returnString = returnString & "<div name=" & oRS("id") & " style='background-color: transparent; border: Black; width: 164; height: 32; background-image: url(images/linkbutton.gif);color:white; text-align: center; vertical-align: baseline; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-style: normal; font-size: xx-small; padding-top: 8;' onClick=openLink(this.childNodes) onMouseOver=setComment(this.childNodes) onMouseOut=unsetComment()>"
' *** Index = 0
returnString = returnString & "<input type=hidden name=""" & oRS("id") & "comment"" value=""" & oRS("Comment") & """>"
' *** Index = 1
returnString = returnString & "<input type=hidden name=""" & oRS("id") & "link"" value=""" & oRS("Url") & """>"
' *** Index = 2
returnString = returnString & "<input type=hidden name=""" & oRS("id") & "title"" value=""" & oRS("Title") & vbcrlf & """>"
' *** Index = 3
returnString = returnString & "<input type=hidden name=""" & oRS("id") & "label"" value=""" & oRS("Label") & vbcrlf & """>"
returnString = returnString & oRS("Name")
returnString = returnString & "</DIV>"
oRS.MoveNext
Loop
End If
oRS.Close
Set oRS = Nothing
oConn.Close
Set oConn = Nothing
returnString = returnString & "<div name=""moveForward"" style=""background-color: transparent; border: Black; width: 164; height: 32; background-image: url(images/linkbutton.gif);color:white; text-align: center; vertical-align: baseline; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-style: normal; font-size: xx-small; padding-top: 8;"" onClick=""moveForward();"">Next</div>"
loadLinks = returnString
Is there anybody who has encountered this problem before.
THX
|