|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all this is my first post, came accross this forum while looking for help topics on google.
I have just changed webhosts and ive had to change my Access DB to a MYSQL DB, this all seems to have worked fine on my local testing server, when i upload it i get a problem, i belive its due to an earlyer version of mysql on the new host, please can any body help me get around this for i am a NOOB! Error = <LI>Error Type: ADODB.Connection.1 (0x80004005) SQLState: 42000 Native Error Code: 1064 [TCX][MyODBC]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'exec getproducts 71' at line 1 /productsnew2.asp, line 172 <LI>Browser Type: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) <LI>Page: GET /productsnew2.asp And here is the the part by line 172... (also highlighted line 172) if id <> 0 then dim lastname,name,content setconnection set rst = server.createobject("adodb.recordset") sql = "SELECT * FROM Types WHERE TypeID = " & id rst.open sql,conn if not rst.eof then descr = rst("Desc") & "" nametype = rst("Type") end if rst.close set rst = nothing set rst = conn.execute("exec getproducts " & id) if not rst.eof then response.write "<table align=""center"" width=""450"" border=""0"" cellpadding=""5"" cellspacing=""0"" class=""text"">" if printscreen <> 1 then response.write "<tr><td><img onClick=""javascript:history.back()"" style=""cursor: hand;"" src=""images/back.gif""></td><td align=""right""><a target=""parent"" href=""productsnew2.asp?id=" & id & "&print=1""><img border=""0"" src=""images/printable.gif""></a><br><br></td></tr>" else response.write "<tr><td colspan=""2"" align=""right""><img style=""cursor:hand;"" onClick=""javascript:window.print();"" src=""images/print.gif""><br><br></td></tr>" end if if descr <> "" then response.write "<tr><td valign=""top"" class=""newsstory"" colspan=""2""" if printscreen = 1 then response.write " height=""660""" response.write "><p align=""justify"">" & replace(descr,vbnewline,"<br>") & "</p><br></td></tr>" else if printscreen = 1 then response.write "<tr><td valign=""top"" class=""newsstory"" colspan=""2"" height=""660""> </TD></TR>" end if lastname = "" dim counter counter = 0 do until rst.eof Please help ![]() |
|
#2
|
||||
|
||||
|
It's your logic
Code:
You close the object
rst.close
You set it to nothing
set rst = nothing
You try to use it????
set rst = conn.execute("exec getproducts " & id)
You can't use an object that doesn't exist anymore. |
|
#3
|
|||
|
|||
|
Quote:
lol! anyway... so what must i do ?here is the whole page... Click |
|
#4
|
||||
|
||||
|
I explained it to you...you are trying to use an object that you have already destroyed.
|
|
#5
|
|||
|
|||
|
Its all a different language to me
so do i not destroy the object ? ![]() i dont understand why it worked before with a ms access database, ive only changed it and told it to connect to it via mysql and re-created the db in mysql, i did notice in the ms access dbs that there were querys ? so im guessing its looking in the database for a preset (GetProducts) query command ? but its not there because its now mysql ? |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Asp - Mysql Problem :( |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|