Parameter 'p6': No size set for variable length data type: String.

Parameter 'p6': No size set for variable length data type: String.

Post by Bryan Ye » Thu, 29 May 2003 12:43:27



Got this error while adding a record into a oracle database using ASP.net
Anyone knows what is this error??
 
 
 

1. [Exception: Parameter 'x': No size set for variable length data type: String.]

Hi,

I have a problem with the Oracle ADO.NET Provider.

When I try to insert into a table a record with a column which have a
value equals to null, I get an error :

Exception: Parameter 'C': No size set for variable length data type:
String.]
   System.Data.OracleClient.OracleParameterBinding.PrepareForBind(OracleConnection
connection, Int32& offset)

My code :

OracleConnection c = new OracleConnection("Data source=datasource;User
Id=username;Password=password;");
OracleCommand cm = new OracleCommand("INSERT INTO TABLE (ID, TITLE)
VALUES (:A,:B)",c);
cm.CommandType = System.Data.CommandType.Text;
OracleParameter p1 = new OracleParameter("A",TextBox1.Text);
OracleParameter p2 = new OracleParameter("B",TextBox1.Text);
OracleParameter p3 = new OracleParameter("C",TextBox2.Text);
cm.Parameters.Add(p1);
cm.Parameters.Add(p2);
cm.Parameters.Add(p3);
c.Open();
cm.ExecuteNonQuery();
c.Close();

And the value (Text) of the TextBox2 is "". You can replace
TextBox2.Text by "".

A solution ...

Thanks.

2. Editing FP2000 in HTML mode?

3. Parameter 'UNVAN': No size set for variable length data type: String.

4. Ericsson + 3Com ?!

5. System.InvalidCastException: Cast from type 'DBNull' to type 'String' is not valid

6. Bluetooth in the US

7. Wanted: Cheap Ethernet card for RISCPC

8. Cast from type 'DBNull' to type 'String' is not valid

9. Error - Cast from type 'DBNull' to type 'String' is not valid

10. Problem with incompatible types and API Call (Argument matching parameter 'parameter' cannot convert from 'Type' to 'Type()'

11. Error Field 'anything.anything' cannot be a zero-length string.

12. Value of type 'String' cannot be converted to 'System.Drawing.Color'