Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

insert csv into clob though c#.net and odbc

273930Jan 10 2008 — edited Jan 25 2008
hi all

i have a little issue inserting my csv from disk into a 10g db using c#.net odbc.

------------------------------------------------------------------------------

try
{
FileInfo myFile = new FileInfo("C:\\test.csv");
StreamReader mySr = new StreamReader(myFile.FullName);
String myTemp = mySr.ReadToEnd();
mySr.Close();

OdbcCommand myCommand = new OdbcCommand("insert into sfrs values (?)", Redthorn.myConn);
OdbcParameter myParam = new OdbcParameter();

myParam.Direction = ParameterDirection.Input;
myParam.OdbcType = OdbcType.NText;
myParam.Value = myTemp;

myCommand.Parameters.Add(myParam);
myCommand.ExecuteNonQuery();
}
catch (Exception ex)
{
WriteDebug(ex.ToString());
}

------------------------------------------------------------------------------

i get the error:
ERROR [NA000] [Microsoft][ODBC driver for Oracle][Oracle]ORA-01460: unimplemented or unreasonable conversion requested

the csv's are larger than 4000 chars, hence the OdbcType.NText (i think this is right?)

any advice would be greatly appreciated.

cheers
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 22 2008
Added on Jan 10 2008
4 comments
5,750 views