No size set for variable length data type : OracleCommandBuilder

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
 
S

StanONE

:?
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
 
D

DotNetJunkies User

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.
 

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