View Single Post
  #1 (permalink)  
Old July 5th, 2009, 12:31 PM
cutnedge cutnedge is offline
Registered User
Points: 24, Level: 1
Points: 24, Level: 1 Points: 24, Level: 1 Points: 24, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2007
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Trying to get this to play nice

Hello everyone,
I have a problem that is about to drive me nuts. I am trying to get asp and ajax to work. I am using mySql database(4.0), IIS 6.0, and javascript code. I also have a working version of this on a PhP site. I can get things to work in that setup, but I can not get the results to display in the ASP version.
Here is the code I am using currently
Code:
<%@ LANGUAGE = JavaScript%>
<%
 var myProdID = Request.QueryString("prod");
 var strConn = "DRIVER={MySQL ODBC 3.51 
Driver};SERVER=........;DATABASE=.......;UID=......;PWD=......";
 var oConn = Server.CreateObject("ADODB.Connection");
 oConn.Open(strConn);
 var oRs;
 oRs = oConn.Execute("SELECT prodID, prodName FROM tblProds WHERE prodID = 'myProdID'");
 var details;
 details = oRs("prodName").Value;
 
     While Not oRs.EOF
      Response.Write details;
      oRs.MoveNext();
     Wend
 
%>
I have received several different errors from running this, the most recent being this

showStatus() called with ready state of 4 and a response text of "JScript compilation error 800a03ec expected ;" and it has the error arrow (^) pointing to right before the While Not .. line of code. I have checked everything I know to do and I don't see anywhere where I left out a semicolon. This is just a simple experiment to see if I can get things to work with this setup.
Does anyone have any idea why this is not working? I would really appreciate some insight.
Thanks in advance
Reply With Quote