Delphi32.com - Home!
| Home/News | Downloads | Forums | D32 Magazine | Resources | Info and Facts |  
 
 Character fields from Access ODBC connection are reported as being double their true size


How come when I use Microsoft's latest ODBC driver for Access the BDE returns the field size for character fields as being double their actual size?   

    This problem occurs because the BDE calls SQLCOLUMNS and the looks at BUFFER_LENGTH to determine the size of a column. With this driver BUFFER_LENGTH is returned as double what the COLUMN_SIZE is.

    Here is what Microsoft used to document what BUFFER_LENGTH should return:

    The length in bytes of data transferred on an SQLGetData, SQLFetch, or SQLFetchScroll operation if SQL_C_DEFAULT is specified. For numeric data, this size may be different than the size of the data stored on the data source. This value is the same as the COLUMN_SIZE column for character or binary data.

    Here is what Microsoft nows documents what BUFFER_LENGTH should return: The length in bytes of data transferred on an SQLGetData, SQLFetch, or SQLFetchScroll operation if SQL_C_DEFAULT is specified. For numeric data, this size may be different than the size of the data stored on the data source. This value might be different than COLUMN_SIZE column for character data.

    Inprise has verified this problem to exist in versions 4.00.37 .08 and 4.00.4202.00 of the Access ODBC driver. Inprise has contacted Microsoft and they have confirmed this new change in the ODBC specification. Inprise is currently evaluting how to resolve this issue in a future release that does not effect other ODBC drivers adversely. Errors that may be causes by problem are "Record/Key Deleted" and "Size Mismatch".

    The workarounds to this problem are: . Use an older version of the ODBC driver. 2. Use the BDE Access Native driver. 3. Use ADO with Delphi 5. 7/28/99 0:46:47 AM

     



  << Previous Faq     Complete List     Next Faq >>  



 
 Hits/month  2,500,000+ 
 Downloads
 (Since May 2000)
 7,393,709 
 Total Files  6,023 
 Forum msgs  7,670 
 Articles/FAQs  70+/900+ 
Kylix
Tips n Tricks
FAQs
Knowledge Base
Bug Listings
Articles
Books
Newsgroups
Links
Submissions
Testimonials
Advertising
Contact Us
About Us
Search Amazon:
Top Selling Software at Amazon

| Home/News | Downloads | Forums | Resources | Info and Facts | Testimonials |
  Site Search:
 


Comments/Problems: Webmaster@delphi32.com
Copyright © 1998-2006, Delphi32.com. All rights reserved.
Terms of Use