开发者

ADO ActualSize vs DefinedSize

开发者 https://www.devze.com 2023-03-23 14:09 出处:网络
I am processing an incoming file with an old VB6 program that uses ADO. At some point the input fields are out-of-synch with the field definition.

I am processing an incoming file with an old VB6 program that uses ADO. At some point the input fields are out-of-synch with the field definition.

I looked at each field and saw this:

The incoming field contains "Yes", the DefinedSize (correctly) = 3 but the ActualSize = 2.

How is ActualSize dete开发者_运维百科rmined? Why is it incorrect?

Thank you.


Here's a guess:

While you didn't specify the details, I'll assume you are using the Jet OLEDB provider's Text IISAM or the old Desktop ODBC Text Driver with the ODCB-Thunk Provider "OLE DB Provider for ODBC" (or something else similar).

"Yes" will be taken as as Boolean valued column if you had no appropriate schema.ini file to define it as Text instead. A Boolean is 2 (2 bytes).

0

精彩评论

暂无评论...
验证码 换一张
取 消