I had buy dotConnect for PostgreSQL Professional edition

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
alex1031s
Posts: 3
Joined: Wed 24 Feb 2010 09:02

I had buy dotConnect for PostgreSQL Professional edition

Post by alex1031s » Wed 24 Feb 2010 09:16

hi I am Chinese

I had buy "dotConnect for PostgreSQL Professional edition"

and I found a bug, we can't use LINQ to Postgresql with chinese !

just can use english. please tell me how can I fix it!

Dim mbisDB As New MbisContext.MbisContext
Dim m_UiMessage = New MbisContext.Country With { _
.Id = Guid.NewGuid.ToString, _
.CountryCode = "try01", _
.CountryName = "測試", _ (here we can't use chinese)
.Modifier = "Admin", _
.UpdateTime = DateTime.Now _
}
mbisDB.Countries.InsertOnSubmit(m_UiMessage)
mbisDB.SubmitChanges()


第一個可能發生的例外狀況類型 'Devart.Data.Linq.LinqCommandExecutionException' 發生於 Devart.Data.Linq.dll
'WindowsApplication3.vshost.exe' (Managed): 已載入 'C:\Windows\assembly\GAC_MSIL\System.Transactions.resources\2.0.0.0_zh-CHT_b77a5c561934e089\System.Transactions.resources.dll'
System.Transactions Critical: 0 : http://msdn.microsoft.com/TraceCodes/Sy ... nException, Devart.Data.Linq, Version=1.0.28.0, Culture=neutral, PublicKeyToken=09af7300eec23701Error on executing DbCommand. 於 Devart.Data.Linq.LinqCommandExecutionException.a(String A_0, Exception A_1)
於 Devart.Data.Linq.Provider.DataProvider.a(String A_0, IList`1 A_1, IDbCommand& A_2)
於 Devart.Data.Linq.v.b(MetaType A_0, q A_1, Boolean A_2)
於 Devart.Data.Linq.f.a(h A_0, Object A_1, ModifiedMemberInfo[] A_2, Boolean A_3)
於 Devart.Data.Linq.k.a(DataContext A_0, ConflictMode A_1)
於 Devart.Data.Linq.k.b(DataContext A_0, ConflictMode A_1)
於 Devart.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
於 Devart.Data.Linq.DataContext.SubmitChanges()
於 WindowsApplication3.Form1.ButtonX1_Click(Object sender, EventArgs e) 於 C:\Users\Alex\Documents\Visual Studio 2008\Projects\WindowsApplication3\WindowsApplication3\Form1.vb: 行 34
於 System.Windows.Forms.Control.OnClick(EventArgs e)
於 DevComponents.DotNetBar.ButtonX.OnClick(EventArgs e)
於 DevComponents.DotNetBar.ButtonX.OnMouseUp(MouseEventArgs e)
於 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
於 System.Windows.Forms.Control.WndProc(Message& m)
於 DevComponents.DotNetBar.PopupItemControl.WndProc(Message& m)
於 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
於 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
於 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
於 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
於 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
於 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
於 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
於 System.Windows.Forms.Application.Run(ApplicationContext context)
於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
於 WindowsApplication3.My.MyApplication.Main(String[] Args) 於 17d14f5c-a337-4978-8281-53493378c1071.vb: 行 81
於 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
於 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
於 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
於 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
於 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
於 System.Threading.ThreadHelper.ThreadStart()Devart.Data.Linq.LinqCommandExecutionException: Error on executing DbCommand. ---> Devart.Data.PostgreSql.PgSqlException: invalid byte sequence for encoding "UTF8": 0xc1c2
於 Devart.Data.PostgreSql.i.a(Boolean A_0, Boolean A_1, Char A_2, Boolean A_3)
於 Devart.Data.PostgreSql.i.b(Boolean A_0, Boolean A_1)
於 Devart.Data.PostgreSql.i.c(Boolean A_0)
於 Devart.Data.PostgreSql.r.i()
於 Devart.Data.PostgreSql.r.a(ad A_0, Byte[][] A_1)
於 Devart.Data.PostgreSql.ad.d()
於 Devart.Data.PostgreSql.PgSqlCommand.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords)
於 Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
於 System.Data.Common.DbCommand.ExecuteReader()
於 Devart.Common.DbCommandBase.ExecuteNonQuery()
於 Devart.Data.Linq.Provider.DataProvider.a(String A_0, IList`1 A_1, IDbCommand& A_2)
--- 內部例外狀況堆疊追蹤的結尾 ---
於 Devart.Data.Linq.LinqCommandExecutionException.a(String A_0, Exception A_1)
於 Devart.Data.Linq.Provider.DataProvider.a(String A_0, IList`1 A_1, IDbCommand& A_2)
於 Devart.Data.Linq.v.b(MetaType A_0, q A_1, Boolean A_2)
於 Devart.Data.Linq.f.a(h A_0, Object A_1, ModifiedMemberInfo[] A_2, Boolean A_3)
於 Devart.Data.Linq.k.a(DataContext A_0, ConflictMode A_1)
於 Devart.Data.Linq.k.b(DataContext A_0, ConflictMode A_1)
於 Devart.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
於 Devart.Data.Linq.DataContext.SubmitChanges()
於 WindowsApplication3.Form1.ButtonX1_Click(Object sender, EventArgs e) 於 C:\Users\Alex\Documents\Visual Studio 2008\Projects\WindowsApplication3\WindowsApplication3\Form1.vb: 行 34
於 System.Windows.Forms.Control.OnClick(EventArgs e)
於 DevComponents.DotNetBar.ButtonX.OnClick(EventArgs e)
於 DevComponents.DotNetBar.ButtonX.OnMouseUp(MouseEventArgs e)
於 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
於 System.Windows.Forms.Control.WndProc(Message& m)
於 DevComponents.DotNetBar.PopupItemControl.WndProc(Message& m)
於 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
於 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
於 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
於 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
於 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
於 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
於 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
於 System.Windows.Forms.Application.Run(ApplicationContext context)
於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
於 WindowsApplication3.My.MyApplication.Main(String[] Args) 於 17d14f5c-a337-4978-8281-53493378c1071.vb: 行 81
於 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
於 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
於 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
於 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
於 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
於 System.Threading.ThreadHelper.ThreadStart()Devart.Data.PostgreSql.PgSqlException, Devart.Data.PostgreSql, Version=4.65.79.0, Culture=neutral, PublicKeyToken=09af7300eec23701invalid byte sequence for encoding "UTF8": 0xc1c2 於 Devart.Data.PostgreSql.i.a(Boolean A_0, Boolean A_1, Char A_2, Boolean A_3)
於 Devart.Data.PostgreSql.i.b(Boolean A_0, Boolean A_1)
於 Devart.Data.PostgreSql.i.c(Boolean A_0)
於 Devart.Data.PostgreSql.r.i()
於 Devart.Data.PostgreSql.r.a(ad A_0, Byte[][] A_1)
於 Devart.Data.PostgreSql.ad.d()
於 Devart.Data.PostgreSql.PgSqlCommand.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords)
於 Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
於 System.Data.Common.DbCommand.ExecuteReader()
於 Devart.Common.DbCommandBase.ExecuteNonQuery()
於 Devart.Data.Linq.Provider.DataProvider.a(String A_0, IList`1 A_1, IDbCommand& A_2)Devart.Data.PostgreSql.PgSqlException: invalid byte sequence for encoding "UTF8": 0xc1c2
於 Devart.Data.PostgreSql.i.a(Boolean A_0, Boolean A_1, Char A_2, Boolean A_3)
於 Devart.Data.PostgreSql.i.b(Boolean A_0, Boolean A_1)
於 Devart.Data.PostgreSql.i.c(Boolean A_0)
於 Devart.Data.PostgreSql.r.i()
於 Devart.Data.PostgreSql.r.a(ad A_0, Byte[][] A_1)
於 Devart.Data.PostgreSql.ad.d()
於 Devart.Data.PostgreSql.PgSqlCommand.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords)
於 Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
於 System.Data.Common.DbCommand.ExecuteReader()
於 Devart.Common.DbCommandBase.ExecuteNonQuery()
於 Devart.Data.Linq.Provider.DataProvider.a(String A_0, IList`1 A_1, IDbCommand& A_2)

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 24 Feb 2010 11:56

Please make sure that your connection string contains "Unicode=true".

alex1031s
Posts: 3
Joined: Wed 24 Feb 2010 09:02

Post by alex1031s » Mon 08 Mar 2010 07:17

thank you for tour answer.

Post Reply