c# - Getting "Internal .Net Framework Data Provider error 30" error when column has NULL value -


i have simple .net console program uses odbcdatareader fetch rows advantage local server. using system dsn defined via odbc administrator on windows 7. data source uses advantage streamlinesql odbc driver v 10.00.00.03 , following params:

  • database path:
  • table type: advantage available
  • server types: local server (als)

the program works fine until encounters row has null value in column. exception:

system.invalidoperationexception caught   message=internal .net framework data provider error 30.   source=system.data   stacktrace:        @ system.data.providerbase.dbbuffer.validate(int32 offset, int32 count)        @ system.data.providerbase.dbbuffer.ptrtostringuni(int32 offset, int32 length)        @ system.data.odbc.odbcdatareader.internalgetstring(int32 i)        @ system.data.odbc.odbcdatareader.getvalue(int32 i, typemap typemap)        @ system.data.odbc.odbcdatareader.getvalue(int32 i)        @ system.data.odbc.odbcdatareader.isdbnull(int32 i)        @ odbctest.program.main(string[] args) in c:\abcoa\visual studio 2010\projects\odbctest\odbctest\program.cs:line 66   innerexception: 

intellisence in vs2010 gives following hint: *_complusexceptioncode = -532462766*

i have turned on odbc tracing , can see following error in sql.log:

odbctest.vshost b34-11e4    exit  sqlsetstmtattrw  return code -1 (sql_error)         sqlhstmt            0x0037c6d8         sqlinteger                1228 <unknown>         sqlpointer          [unknown attribute 1228]         sqlinteger                  -5           diag [hy092] [ianywhere solutions][advantage odbc driver]invalid attribute identifier. (2184)   odbctest.vshost b34-11e4    enter sqlgetdiagfieldw          sqlsmallint                  3          sqlhandle           0x0037c6d8         sqlsmallint                  1          sqlsmallint                  4          sqlpointer         0x05abe480         sqlsmallint                 12          sqlsmallint *       0x05abe548 

if can appreciate it!

after contacting sybase's advantage.odbc newsgroup suggested may bug fixed in new upcoming release. able new version of driver contacting sybase @ advantage@sybase.com , asking them 10.0.0.5 version of odbc driver.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -