Last post Mar 10, 2011 03:27 PM by elaine86
Feb 15, 2011 11:20 AM|elaine86|LINK
I am currently making a website on asp.net and i am creating methods using TableAdapter. I am connected to MySql using an ODBC connection.
The select * from department will work perfectly for me but when trying to use parameters i am given an error message on the wizard.
select * from department where name = @name gives me the error: Error in where clause near
'@' unable to parse query text.
also tried select * from department where name = ?: this gives me the error: No mapping exists from dbTypeObject to a known Odbc type.
Have limited knowledge in this area and any help would be much appreciated!!
Mar 05, 2011 08:53 AM|coredev|LINK
Could you please provide the code that you are using so we can see how the command is build and whether there are any errors in that?
Mar 05, 2011 10:23 AM|Spire.Doc-e-Iceblue|LINK
You may view this article which I have just read, it used connection string to database. I think it may help you.
Mar 10, 2011 03:27 PM|elaine86|LINK
It worked fine when I use select * from department where id = ?. Just wouldnt work when
I use select * from department where name = ?.
Just using the ID now cause couldnt sort by name.