PC Review


Reply
Thread Tools Rate Thread

C# Oracle CLOB

 
 
Puleen Patel
Guest
Posts: n/a
 
      22nd Mar 2004
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





 
Reply With Quote
 
 
 
 
Paul Clement
Guest
Posts: n/a
 
      22nd Mar 2004
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 Removed)
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
Puleen Patel
Guest
Posts: n/a
 
      22nd Mar 2004
Microsoft's .NET provider is what I am using.

"Paul Clement" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 Removed)
> Microsoft MVP (Visual Basic)



 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      23rd Mar 2004
On Mon, 22 Mar 2004 14:52:05 -0500, "Puleen Patel" <puleen at canada dot com> wrote:

¤ Microsoft's .NET provider is what I am using.
¤

See if the following thread helps:

http://www.dotnet247.com/247referenc...20/103072.aspx


Paul ~~~ (E-Mail Removed)
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
Puleen Patel
Guest
Posts: n/a
 
      23rd Mar 2004
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

"Paul Clement" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> On Mon, 22 Mar 2004 14:52:05 -0500, "Puleen Patel" <puleen at canada dot

com> wrote:
>
> ¤ Microsoft's .NET provider is what I am using.
> ¤
>
> See if the following thread helps:
>
> http://www.dotnet247.com/247referenc...20/103072.aspx
>
>
> Paul ~~~ (E-Mail Removed)
> Microsoft MVP (Visual Basic)



 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      24th Mar 2004
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 Removed)
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
Puleen Patel
Guest
Posts: n/a
 
      24th Mar 2004
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

"Paul Clement" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 Removed)
> Microsoft MVP (Visual Basic)



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Oracle <CLOB> question jason Microsoft Excel Programming 3 20th Nov 2009 07:52 PM
ACCESS/ORACLE CLOB datatype-export ACCESS report to EXCEL CLOB tru Lynn Microsoft Access Form Coding 0 18th Jul 2008 04:01 PM
Oracle CLOB column =?Utf-8?B?RGlmZmlkZW50?= Microsoft ASP .NET 0 7th Jun 2005 03:42 PM
how to insert a clob to Oracle 9i db Linda Chen Microsoft ADO .NET 1 2nd Jul 2004 02:18 PM
clob into oracle ewen mcdonald Microsoft ADO .NET 4 15th Sep 2003 09:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:45 AM.