|
-
Aug 8th, 2008, 03:11 AM
#1
Thread Starter
Member
Microsoft JET Database Engine error '80040e14'
Hi there,
I have a set of check box to control a database which means that after i checked the check box and press submit, they will go to next page.
But i have face a problem that is below:
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 'ID =1</TD'.
I don't know why i get this error, maybe i did not doing well coding at the value of the check box. Then below is the code that i use:
------form.asp-------
......a loop coding to loop for the data into this form.....
"<TD><input type=""checkbox"" name=""ID"" id=""ID"" value=" & rsCusts .Fields("ID") & "</TD>" & _
.....coding for the form also.....
------dt.asp------
......above got some coding for checking.....
For i = 1 to Request.Form("ID").Count - 1
strI = Request.Form("ID")(i)
strSOL="SELECT * FROM customer WHERE ID ="& strI
rsCust Open strSOL, objConn <-------ERROR HERE~
......below is the coding that showing data at the page......
Please help me...i already searching for this answer for a long time already, but i still can not solve it. This system just like the web e-mail system can checked some e-mail and press delete to delete the records. But this is showing those records which are selected.
Thank you.
-
Aug 11th, 2008, 02:46 PM
#2
Re: Microsoft JET Database Engine error '80040e14'
What value of Request.Form("ID")(i) is being passed in? Do a write to the page to see what it is.
-
Aug 11th, 2008, 09:49 PM
#3
Thread Starter
Member
Re: Microsoft JET Database Engine error '80040e14'
Hello Mendhak,
Thank for your reply.
I have try it, that will be the value in the checkbox. But it is very strange, i print it out very clear that is the answer which i want.
After that i try to use the same way to detect the value and do a filter in the database, it comes out the error which i already post as above.
So now i need some advices to solve this problem.
Thank you.
-
Aug 12th, 2008, 07:21 AM
#4
Re: Microsoft JET Database Engine error '80040e14'
All I can think is you are passing a string as an ID and it is expecting a number. Try changing the SQL to this and see if it works.
strSOL = "SELECT * FROM customer WHERE ID =" & CInt(strI)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|