C# Oracle CLOB

P

Puleen Patel

I am not sure if anyone has a quick and proofed solution for this.
Using C# I am trying to insert a new record into oracle database, where two
of the fields are
CLOB's. I am using Parameterized queries and running into a problem when
trying to add
one of the parameters to the command object. The error I get is as follows:

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

text_search is a CLOB field.

To add to the parameters I am doing the following:

oCommand.Parameters.Add("text_search",this.text_search);

Anyone suggest a good way to use parameterized queries and to add records to
Oracle using C#?

puleen at canada dot com
Cheers
 
P

Paul Clement

On Mon, 22 Mar 2004 14:19:07 -0500, "Puleen Patel" <puleen at canada dot com> wrote:

¤ I am not sure if anyone has a quick and proofed solution for this.
¤ Using C# I am trying to insert a new record into oracle database, where two
¤ of the fields are
¤ CLOB's. I am using Parameterized queries and running into a problem when
¤ trying to add
¤ one of the parameters to the command object. The error I get is as follows:
¤
¤ Parameter 'text_search': No size set for variable length data type: String.
¤
¤ text_search is a CLOB field.
¤
¤ To add to the parameters I am doing the following:
¤
¤ oCommand.Parameters.Add("text_search",this.text_search);
¤
¤ Anyone suggest a good way to use parameterized queries and to add records to
¤ Oracle using C#?
¤

Are you using Microsoft's .NET Provider or Oracle or Oracle's ODP.NET?


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
P

Puleen Patel

I looked at that link you pasted, unfortunately I am still getting the same
error:

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

where text_search is a CLOB field, I have another CLOB field as well

 
P

Paul Clement

On Tue, 23 Mar 2004 16:25:19 -0500, "Puleen Patel" <puleen at canada dot com> wrote:

¤ I looked at that link you pasted, unfortunately I am still getting the same
¤ error:
¤
¤ Parameter 'text_search': No size set for variable length data type: String.
¤
¤ where text_search is a CLOB field, I have another CLOB field as well
¤

Perhaps you could post the code you now have and identify on what line the error is occurring.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
P

Puleen Patel

I am rethinking the logic and retrying the whole insert process. Once I have
changed it, if I run into another related
problem I will post more with regards to the code that I am using.

Cheers

Puleen

 

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