[Mono-list] Recommended MySQL Data Provider?
David P. Donahue
ddonahue at ccs.neu.edu
Mon Nov 7 09:48:09 EST 2005
> When I converted my project from ByteFx to the newer connector I had to
> change all the parameter code from @Param to ?Param
> Also any param declared as int I had to change to int32
>
> If you get an error in your sql syntax it likely won't bring back a
> datatable thus the error you see masks the real error, not sure if thats
> the problem but hope it helps.
To test this, I wrote a couple web service functions which use
manually-written SELECT statements, so the syntax shouldn't be a
problem. But I still get either this same error or "Thread was being
aborted."
I'm concerned about how it may be masking a "real error" though. My
error trapping for the function is as follows (sorry for any wrapping):
try{
mySqlConnection = new MySqlConnection(Global.strongConnection);
mySqlDataAdapter = new MySqlDataAdapter("SELECT * FROM FAQ",
mySqlConnection);
dataSetSQL = new DataSet();
mySqlDataAdapter.Fill(dataSetSQL);
return dataSetSQL;
}
catch (Exception e){
return new DataSet(e.Message);
}
Would this be enough to catch any such errors? Or do I need to change
that at all?
Regards,
David P. Donahue
ddonahue at ccs.neu.edu
http://www.cyber0ne.com
More information about the Mono-list
mailing list