[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.odbcnet

Fixed length columns and parameter generation

Bob Beauchemin

3/11/2002 10:18:00 PM

I'm wondering if anyone else has seen this problem, I believe its a bug.

The ODBC spec says the if a column is fixed length, ColumnLength is ignored,
ie, you can return ColumnLength=0 in its metadata. I've worked with a number
of drivers (from different companies) that do this. However, when updating
through a CommandBuilder, the command is correctly generated but no data
appears in such a column. This has the effect of causing the INSERT, UPDATE
or DELETE to fail in the database.

I've noticed that Microsoft drivers (the tested ones) all generate a
non-zero length, which means they work fine.

Can anyone confirm this? Will this be fixed?

Thanks,
Bob Beauchemin
bobb@develop.com



2 Answers

(David Sceppa)

3/12/2002 3:44:00 AM

0

Bob Beauchemin

3/12/2002 5:01:00 AM

0

After doing some more experiments today, it appears, at this point, to be
driver-related, although I'm still working to figure out problems. Although
most drivers report 0 ColumnLength for fixed length columns, only some of
them are sending zero-length strings as parameters. Others, such as
DataDirect, are not, and can successfully use OdbcCommandBuilder.

Thanks for looking into this,
Bob Beauchemin
bobb@develop.com


"David Sceppa" <davidsc@online.microsoft.com> wrote in message
news:rbAe0#WyBHA.2624@cpmsftngxa07...
> Bob,
>
> As far as I know, the CommandBuilder only uses the column
> length for character and binary data types. Appendix D states
> that the driver should return the defined or maximum length (in
> characters for character columns, in bytes for binary columns) of
> the column for these data types. If I've missed something in the
> ODBC spec somewhere, please let me know.
>
> David Sceppa
> Microsoft
> This posting is provided "AS IS" with no warranties,
> and confers no rights. You assume all risk for your use.
> © 2002 Microsoft Corporation. All rights reserved.