Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MS KB article 867852 released
Message
From
07/09/2004 09:46:24
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00939460
Message ID:
00939921
Views:
16

I'm sorry Fabio but it doesn't explain inconsistency between NVARCHAR, NCHAR and NTEXT() mapping to a memo field. In other words, why SQL_WVARCHAR is mapped to SQL_C_WCHAR but SQL_CHAR and and SQL_WLONGVARCHAR are mapped to SQL_C_CHAR in this case.


When a application like VFP get ODBC data, it do this:
- call SQLColAttributes  SQL_COLUMN_TYPE
.....
- alloc a memory buffer for the SQL_COLUMN_TYPE
- call SQLFetch for fill the ODBC buffer
- call SQLGetData SQL_C_CHAR <== Is the ODBC driver that copy the data !
If VFP do not alloc a buffer with 2*N bytes,
it cannot call SQLGetData SQL_C_WCHAR because this would generate a overrun buffer.

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform