1.9.3.2 - The overloaded method with signature GetTableColumns(JET_SESSID, JET_DBID, string) returns garbage column names. The other overload produces correct names.
The attached image shows a pause in the debugger and tooltip with the offending column names.
Greg K
Comments: ** Comment from web user: grafnetter **
Hi Martin,
this ISAM code fails for me on W7:
```
TableDefinition table = database.Tables["Data"];
foreach(var column in in table.Columns) { }
```
No, the column name does not contain any non-ascii characters. Loading its name this way works:
```
string columnName = Api.RetrieveColumnAsString(
database.IsamSession.Sesid,
columnList.tableid,
columnList.columnidcolumnname,
Encoding.ASCII);
```
But if Encoding.Unicode is used instead, total gibberish is loaded into columnName. It looks like Chinese characters. My understanding of it is that 2 subsequent ASCII characters are being interpreted as 1 UTF-16 character. When this happens, the next call throws the exception I have described in my previous comment:
```
Api.JetGetColumnInfo(database.IsamSession.Sesid, database.Dbid, tableName, columnName, out columnbase);
```
The problem might have something to do with this code:
```
// If we use the wide API (Vista+), then the temp table will be in UTF-16.
Encoding encodingOfTextColumns = EsentVersion.SupportsVistaFeatures
? Encoding.Unicode
: Encoding.ASCII;
```
And it of course evaluates to Encoding.Unicode on Windows 7.
The GetTableColumnsByTableNamesTest FAILS with KeyNotFoundException on my "Windows 7 Professional SP1 64-bit" with the most current updates.
Again, everything runs normally on Win8.