[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

Problem with updating when 'desc' is a column

Kevin Dill

11/18/2002 5:38:00 PM

We're having serious problems using a DataAdapter to
update a set of changes we've made to a table within a
dataset. We are connecting to a Sybase database and one
of the field names is "desc". (Unfortunately, we cannot
just rename the field since a different client/server app
uses that field also.)

We get the following error when we go to try to update...

System.Data.OleDb.OleDbException: Syntax error or access
violation: near 'desc' in ...,tax_flg,disc_flg,
[desc],price,ext_price,...

Sybase doesn't recognize the brackets, but when we try to
replace the commandText with something else, we continue
to get the same error.

Please help! Thanks!

Kevin Dill
E-Business Practice Lead
SARK, Columbus
kdill@sark.com

1 Answer

(Hussein Abuthuraya(MSFT))

11/19/2002 12:24:00 AM

0

Kevin,

When using OdbcCommandBuilder object, you may specify the QuotePrefix and QuoteSuffix properties equal "[" and "]" so that all objects (table and colum names) will be
surrounded by "[]" when building the Insert/Update/Delete commands.

I hope this helps!


Thanks,
Hussein Abuthuraya
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.co....