No size set for variable length data type : OracleCommandBuilder

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I am having the same issue that was posted by:

From: Javier Ros (jros@NO$PAMHEREemuasa.es)
Subject: No size set for variable length data type: String
View: Complete Thread (2 articles)
Original Format
Newsgroups: microsoft.public.dotnet.framework.adonet
Date: 2003-07-08 01:44:11 PST

I am using the OracleCommandBuilder attached to my Adapter and DataSet
to
dynamically generate the Update command for my DataSet.

The parameters collection, I can only assume, is being created by the
OracleCommandBuilder object when it generates the UpdateCommand on the
OracleDataAdapter. I have not explicitly defined ANY parameters for
this command, but have let the builder do the job for me.

I am using the same routine to insert/update a table that has only
numeric values and that works fine. Is there something else that I
need to do on
variable-length text fields that does not apply to numeric columns?

Jeff
 
:?
hi,
I'v got this problem when I try to import records from text file to
Oracle DB.
I found that if you try to update some records contain the char "*" or
"%" the exception occurs.

Have any idea?

Cheers,

Stanley
 
Several solutions to this problem. You need to set a size. Try one of the following:

1) set the value to dbnull like
oDataRow("COLNAME") = DbNull.Value

2) If it is null anyway, do this:
oDataRow("COLNAME") = OracleType.VarChar

3) Set the size manually:
oCommand.Parameters(":p10").Size = 25

Yuck. But they work.
 
Back
Top