[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql
Subject:    Help Please: Substitute Text to replace Stored Procedures for use with MySQL
From:       Chrisbarbers () aol ! com
Date:       2003-07-31 18:43:43
[Download RAW message or body]


Hi

 

I have purchased a package that uses ASP and SQL, my webhost provides MYSQL 
and I have loaded my access database and all seems to be working fine. 

Except the stored procedures (Queries) the webhost says MYSQL doesn't support 
stored procedures, as this site confirms (wait for v5.0) but the same effect 
can be achieved using ASP, an example of what they offer in help is below: 

SQLQuery = "SELECT * FROM tblAPCategories"
Set RS = gsconnect.Execute(SQLQuery)
Do While Not RS.EOF
%>
<%=RS("catID")%>, etc... 

This works fine for dumping the contents of these fields to the screen, my 
problem is that my ASP app calls stored procedures in the following way: 

sSQL = "qdpAPGetMaxCatLevel" etc... the variable seems to be called 
repeatedly after this, I'm assuming sSQL is the variable, the query for this is: 

SELECT Max(catLevel) AS calcMaxLevel
FROM tblAPCategories; 

The answer is 3 which I can get to using the ASP text suggested, but I can't 
seem to work out how to replace the call to the stored procedure with the ASP 
text to make the ASP function as intended, it just crashes out at the point 
this is called, and believe me I have tried everything, except what works 
obviously.

I even tried creating a table with the same name and typing in the answer 
just to see if I could further, it knew it was a table and stopped just the same.

Can anyone help, if I can crack one I think I can crack the rest, although to 
be fair this appears to be one of the easier queries. 

Thanks in advance for anyone's help. 

Chris





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic