[Mono-dev] URGENT: Odbc-Exception-Error
Jan Waiz
hamburg at icomedv.de
Wed Aug 17 03:51:53 EDT 2005
HI All,
view Days ago i postet Porblems with ODBC and Postgre.
One Answer was testet without solving the Problem so I send it to bugzilla
without any Answer up to know.
Now I am running in Timeproblems for the Project because I cant finish
important Parts of the Application and the Deadline will come! So I am
coming in Trouble if I did not found a Solution. Be so kind and let me know:
How did YOU work via ODBC with a SQL-Database meaning: How did you build
Insert- or Updatestatements? And how did you solve the Problem with escaping
Signs like <> or german Signs like äöü ? Or did you work with an other
SQL-Database in the descriped way without any Problems (*s*) ?
In short I am doing it like this:
cStmnt = UPDATE ComanySTD SET +
Name1 = ?,
Name2 = ?
WHERE PKey = + cPKey +
oCommand.Parameters.Add( @Name1, Textbox_Name1.Text.Trim() )
oCommand.Parameters.Add( @Name2, Textbox_Name2.Text.Trim() )
oCommand.ExecuteNonQuery()
wich is working fine running under Localhost but makes an Error running
under Mono:
System.Data.Odbc.OdbcException: [unixODBC]Unrecognized C_parameter type in
copy_statement_with_parameters
When changing to:
cStmnt = UPDATE ComanySTD SET +
Name1 = + Textbox_Name1.Text.Trim() + ,
Name2 = + Textbox_Name2.Text.Trim() + ,
WHERE PKey = + cPKey +
It works. But without excaping! And Signs like äöü will shown as
Crashed-Signs in a Textbox when showing a Record.
I am playing around with different Ways using Parameter like:
oCommand.Parameters.Add( @Name1, OdbcType.varchar, 36 ).Value =
Textbox_Name1.Text.Trim()
but everytime the same Runtimeerror.
So now I am at the end of my Nerves and my Knowledge. Hope, there is
anyone outside there, who can tell me, how he is using ODBC-Parameter
Many Thanks for ANY Help !!!
Jan Waiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050817/663a2bd4/attachment.html
More information about the Mono-devel-list
mailing list