Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 21st, 2004, 03:59 AM
KuTz KuTz is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 3 KuTz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Asp - Mysql Problem :(

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"">&nbsp;</TD></TR>"
end if
lastname = ""
dim counter
counter = 0
do until rst.eof




Please help

Reply With Quote
  #2  
Old October 21st, 2004, 11:03 AM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,760 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 5 h 22 m 16 sec
Reputation Power: 443
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.

Reply With Quote
  #3  
Old October 22nd, 2004, 04:01 AM
KuTz KuTz is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 3 KuTz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by Memnoch
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.
im a complete neewbie with asp, it was a ecommerce site we got made, but we have changed hosts. so ive had to change the database to mysql, some of it work i.e the news scroller, grabbing data from the database. im only good at photoshop n making pretty things lol! anyway... so what must i do ?

here is the whole page... Click

Reply With Quote
  #4  
Old October 22nd, 2004, 09:13 AM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,760 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 5 h 22 m 16 sec
Reputation Power: 443
I explained it to you...you are trying to use an object that you have already destroyed.

Reply With Quote
  #5  
Old October 22nd, 2004, 09:22 AM
KuTz KuTz is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 3 KuTz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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 ?

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Asp - Mysql Problem :(


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway