Error when inserting Thai characters into Oracle using ASP.NET/VB.NET backend with OLE DB

I am able to select Thai characters from an Oracle DB using OLE DB and display them on a web form. When I take the same web form with Thai characters to insert into the DB I get the error below.

Questions:
1) Is it possible to use OLE DB to insert Thai characters in Oracle?
2) If the answer is yes to #1, how can it be done?
3) Is there any glaring problems with the code below that would prevent this from working?

Code:
            Me.OleDbInsertCommand1.Parameters("RESPECT").Value = rdbList1.SelectedItem.Value
            Me.OleDbInsertCommand1.Parameters("RESPECT_COMM").Value = txtRespect_Comm.Text
            Me.OleDbInsertCommand1.Parameters("SPIRIT").Value = rdbList2.SelectedItem.Value
            Me.OleDbInsertCommand1.Parameters("SPIRIT_COMM").Value = txtSpirit_Comm.Text
            Me.OleDbInsertCommand1.Parameters("LEADER").Value = rdbList3.SelectedItem.Value
            Me.OleDbInsertCommand1.Parameters("LEADER_COMM").Value = txtLeader_Comm.Text
            Me.OleDbInsertCommand1.Parameters("OVERALL").Value = rdbList4.SelectedItem.Value
            Me.OleDbInsertCommand1.Parameters("OVERALL_COMM").Value = txtOverall_Comm.Text
            Me.OleDbInsertCommand1.Parameters("COMMENTS").Value = txtComments.Text
            Me.OleDbInsertCommand1.Parameters("SHIFT").Value = rdbListShift.SelectedItem.Value
            Me.OleDbInsertCommand1.Parameters("DEPT").Value = txtDept.Text
            Me.OleDbInsertCommand1.Parameters("EMP_STATUS").Value = rdbListStatus.SelectedItem.Value
            Me.OleDbInsertCommand1.Parameters("GP_BU").Value = ddListBU.SelectedItem.Value
            Me.OleDbInsertCommand1.Parameters("BEST_COMM").Value = txtBest_Comm.Text
            Me.OleDbInsertCommand1.Parameters("RECOMMEND").Value = rdbList5.SelectedItem.Value
            Me.OleDbInsertCommand1.Parameters("INTENTION").Value = rdbList6.SelectedItem.Value
            Me.OleDbInsertCommand1.Parameters("FACTOR_COMM").Value = txtFactor_Comm.Text
 
            'Open the connection
            Me.OleDbInsertCommand1.Connection.Open()
            Me.OleDbInsertCommand1.ExecuteNonQuery()


Error Message:

No error information available: DB_E_ERRORSOCCURRED(0x80040E21).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: No error information available: DB_E_ERRORSOCCURRED(0x80040E21).

Source Error:

Line 535:            'Open the connection
Line 536:            Me.OleDbInsertCommand1.Connection.Open()
Line 537:            Me.OleDbInsertCommand1.ExecuteNonQuery()

Source File: c:\inetpub\wwwroot\gpform\gpform1_thai.aspx.vb    Line: 537

Stack Trace:
[OleDbException (0x80040e21): No error information available: DB_E_ERRORSOCCURRED(0x80040E21).]

[InvalidOperationException: Command parameter[2] 'RESPECT_COMM' data value could not be converted for reasons other than sign mismatch or data overflow.
]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr)
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
   System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
   System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
   System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
   gpform.gpform1_thai.btnSubmit_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\gpform\gpform1_thai.aspx.vb:537
   System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   System.Web.UI.Page.ProcessRequestMain()
 
disney71Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mrwebdevCommented:
Maybe these documents can help, I myself have not experienced this scenario.

1:) http://support.microsoft.com/default.aspx?scid=kb;en-us;294160
2:) http://support.microsoft.com/kb/312288

Good Luck!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
abdullah716Commented:
This seems to be the problem:

'RESPECT_COMM' data value could not be converted for reasons other than sign mismatch or data overflow.

what type is that field? and what did you put in txtRespect_Comm.Text?
0
disney71Author Commented:
RESPECT_COMM is a text box. We put in one Thai character to test it and this is the error. It is not a required field, but a comment field so it may or may not be filled out for each user.

I am pretty sure it is the Thai character and OLE DB. Everything else works until we put in a Thai character.

We can also use SQL Plus to insert Thai characters straight into Oracle so we are sure the Oracle instance is set up correctly.
0
abdullah716Commented:
No, txtRespect_Comm is the textbox. I was asking about RESPECT_COMM parameter. Anyway, try to escape charcaters. For example, single quotes could be repeated or backslashed.

How does a typical Thai character look like?
0
disney71Author Commented:
Finally got some information. Microsoft's OLE DB driver was built to use Oracle 7, which does not support Unicode. We are using Oracle 9. It was suggested we use the Oracle OLE DB driver, which we are in the process of testing.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.