|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
delete worked with access and doesnt with mysql
Hello
I wrote a line to delete from a record from access and it did. But I had to convert to mysql because of my host. Now I get this error on the page. I worked this for a while and am hoping someone has a fix. ______________________________________________ Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [MySQL][ODBC 3.51 Driver][mysqld-4.0.15-nt]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 'WHERE id = 41 and sendto = score' at line 1 /mattaweber/login/messagedelete_clients.asp, line 11 __________________________________________________ Here is the problem code <% Dim messageid,username,rsMessage username = Session("username") messageid = Request.QueryString("messageid") set rsMessage = Con.Execute("DELETE From messages.* WHERE id = "&messageid&" and sendto = "&username&"") Con.close set Con = nothing Response.Redirect("Clients_inbox.asp") %> line11 is this: set rsMessage = Con.Execute("DELETE From messages.* WHERE id = "&messageid&" and sendto = "&username&"") PS -- I tried this already with single quotes around the id and username Thanks for any help. |
|
#2
|
|||
|
|||
|
try this
Code:
set rsMessage = Con.Execute("DELETE From messages WHERE id = "&messageid&" and sendto = '"&username&"'")
Last edited by pda8333 : October 3rd, 2003 at 12:06 AM. |
|
#3
|
|||
|
|||
|
It worked almost exactly like you said -- I just had to add ' ' on username.
set rsMessage = Con.Execute("DELETE From messages WHERE id = "&messageid&" and sendto = '"&username&"'") I struggled over this line for hours and hours and you fixed it 30 minutes after I posted. Thank you so much. That was the last error in my website. Launch time!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|
#4
|
|||
|
|||
|
glad to help. we do mistakes all the time.
![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > delete worked with access and doesnt with mysql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|