We tried to use odbc driver in C#. When fecth unicode Chinese values, some error ocurred:
System.InvalidOperationException
Message="Internal .Net Framework Data Provider error 30."
Source="System.Data"
StackTrace:
at System.Data.ProviderBase.DbBuffer.Validate(Int32 offset, Int32 count)
at System.Data.ProviderBase.DbBuffer.PtrToStringUni(Int32 offset, Int32 length)
at System.Data.Odbc.OdbcDataReader.internalGetString(Int32 i)
at System.Data.Odbc.OdbcDataReader.GetString(Int32 i)
at MonetDBTest.Form1.button1_Click(_object_ sender, EventArgs e) in E:\D_Bak\~MyWorks\MonetDB\MonetDBTest\Form1.cs:line 41
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.PerformClick()
at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at MonetDBTest.Program.Main() in E:\D_Bak\~MyWorks\MonetDB\MonetDBTest\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(_object_ state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, _object_ state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: