Forums
This topic is locked
Connecting to a remote server using MySQL
Posted 06 Nov 2001 12:03:07
1
has voted
06 Nov 2001 12:03:07 Sally Pugh posted:
Hello to you all <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> I'm a total newbie to all this asp lark! What fun eh? LOLI would be really greatful if someone could help me out here please? I have tried honest!
Using Ultradev, I've created a search page and a results page and uploaded both to our service provider. I've also created a database in Access 97 and successfully uploaded that to our service provider using MySQL. When I check the connection within the results page in Ultradev I'm told that the 'connection was made successfully' yet when I run the query 'live' then I'm told 'ADODB.Recordset.1 error '800a0e7d' Invalid connection'. It seems to always get stuck at the 'rssubjectguides.Open' bit!
Here's the relevent (I presume <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle> code:
<%@LANGUAGE="VBSCRIPT"%> <%
Dim rssubjectguides__varsubject
rssubjectguides__varsubject = "%"
if(Request("subject"



Dim rssubjectguides__varcampus
rssubjectguides__varcampus = "%"
if(Request("campus"



%> <%
set rssubjectguides = Server.CreateObject("ADODB.Recordset"

rssubjectguides.ActiveConnection = "dsn=subjectguides;"
rssubjectguides.Source = "SELECT * FROM subjectguidestbl1 WHERE subject LIKE '" + Replace(rssubjectguides__varsubject, "'", "''"


rssubjectguides.CursorType = 0
rssubjectguides.CursorLocation = 2
rssubjectguides.LockType = 3
rssubjectguides.Open
rssubjectguides_numRows = 0
%>
Thanks in anticipation!