ole db connection with as400

E

Esperanza

Hello .net expert !

Error : Invalid cast from System.String to System.Byte[].

I use an oledb connection to connect to as400 to insert value in a table.
I got the above error while trying to insert value in a table.

above you will see my connection string
I tried
Force Translate=37
Force Translate=00037
Always the same error message.

thanks in advance !!
Esperanza

SQL Package Name=;Sort Language ID=;Default Collection=Soniq;Add Statements
To SQL Package=True;Hex Parser Option=0;Query Options File Library=;Use SQL
Packages=False;Maximum Decimal Precision=31;Data
Source=tresor;Password=*****;Sort Sequence=0;Protection Level=None;Convert
Date Time To Char=TRUE;Provider="IBMDA400.DataSource.1";SQL Package Library
Name=;SSL=DEFAULT;Block Fetch=True;Persist Security Info=True;Extended
Properties=;Cursor Sensitivity=3;Transport Product=Client Access;Unusable
SQL Package Action=1;Catalog Library List=Soniq;Trace=0;Maximum Decimal
Scale=31;Force Translate=0;Data Compression=True;Sort Table Name=;User
ID=ntuser;Minimum Divide Scale=0;Initial Catalog=TRESOR
 
M

Miha Markic [MVP C#]

It sounds like you have a parameter defined as Byte[] where you are passing
a string instead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top