[Mono-list] IDbCommand + String parameter + nvarchar(4000)

Gazzall gaby_sev at hotmail.com
Wed May 30 03:13:59 EDT 2007


Hi,

I am  using a IdbCommand  and IDataParameter to make a request to the data
base.

For the testing I'm using a MS SQL data base (I can be Oracle or Access) 
but I got a problem with MS SQL request.

My request is cmd.Parameters.Add( param ); 

where param is a string type which is length is 101200.

In my data base the data type is nText.

But in my request I have something like that:

exec sp_executesql N'INSERT INTO DataTable (Object) VALUES (@Object)  ',
N'@Object nvchar(4000)',  @objet=N' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
......'

But the parameter Object should be a text type not a nvarchar(4000)  which
is to small for my data.

Do you have any idea to make sure the paramater will be a text type and not
aa nvachr(4000) type.

I can not use the SqlCommand because my data base could be an other than MS
SQL

Thanks

Gazzall

-- 
View this message in context: http://www.nabble.com/IDbCommand-%2B-String-parameter--%2B-nvarchar%284000%29-tf3838635.html#a10868666
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list