| | |
Help with asp error
Please support our ASP advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Apr 2006
Posts: 3
Reputation:
Solved Threads: 0
I am doing a simple profile update webpage, I keep getting this error and can'y figure out how to fix it. I have included the code. The only field in my database that isn't a text field is my userid field which is an autoinumber field.
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
Any help with this would be greatly appreciated.
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
Userid = Request.Form("Uidfield")
strSQL = "SELECT * FROM users WHERE Uid='"& Userid &"';"
Set results = cnnEXDB.Execute(strSQL)
Any help with this would be greatly appreciated.
Last edited by dave1323; Jun 24th, 2006 at 4:22 pm.
•
•
Join Date: Jul 2005
Posts: 483
Reputation:
Solved Threads: 19
by putting the single quotes around the it, you are making it text instead of a number. also you are leaving yourself open to a sql injection attack. you want this
ASP Syntax (Toggle Plain Text)
Userid = CInt(Request.Form("Uidfield")) 'By using CInt you prevent people from passing in inappropriate data strSQL = "SELECT * FROM users WHERE Uid="& Userid &";" Set results = cnnEXDB.Execute(strSQL)
![]() |
Similar Threads
- http://localhost:8080/UCComplain/UserComplain.asp error (ASP)
- ASP Code Works on Local 127.0.0.1 but Not on ISP's Server (ASP)
- Server Error in '/' Application (ASP)
- register error (ASP)
- Error while trying the update query (ASP)
- radio button ASP question?? (ASP)
- Problem with cdonts mails in asp (ASP)
- Displaying error line number (ASP)
Other Threads in the ASP Forum
- Previous Thread: ASP File Publish in PHP server
- Next Thread: ASP Scritp Help
| Thread Tools | Search this Thread |
archive asp aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection dreamweaver excel fso msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption single specfic sqlserver sqlserverconnection





