|
-
Apr 9th, 2006, 03:14 AM
#1
Thread Starter
Hyperactive Member
what error is this?
I'm using .net with mysql. Sometimes, it reports below error. I'm inserting a string into table, the string value is 'http://www.mysite.com/?aid=1001'. It is just a string, I do not understand why it thinks ?aid is a parameter? how to fix this? The weird thing is sometimes the error shows up, sometimes, not.
thanks
bear
========================
A first chance exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll
MySql.Data.MySqlClient.MySqlException: Parameter '?aid' must be defined
at MySql.Data.MySqlClient.MySqlCommand.SerializeParameter(PacketWriter writer, String parmName)
at MySql.Data.MySqlClient.MySqlCommand.PrepareSqlBuffers(String sql)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
Last edited by FlyingBear; Apr 9th, 2006 at 07:37 PM.
-
Apr 9th, 2006, 04:11 AM
#2
Re: what error is this?
The question mark acts as a placeholder for the SQL parameter. I havent worked much with SQL, you can try escaping that character with a "\" (although that was just throwing something out there)... or whatever the normal SQL escape character is...
-
Apr 9th, 2006, 07:36 PM
#3
Thread Starter
Hyperactive Member
Re: what error is this?
 Originally Posted by gigemboy
The question mark acts as a placeholder for the SQL parameter. I havent worked much with SQL, you can try escaping that character with a "\" (although that was just throwing something out there)... or whatever the normal SQL escape character is...
thanks, it works!
bear
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
|