PC Review


Reply
Thread Tools Rate Thread

BIG BUG in SqlCommandBuilder.DeriveParameters

 
 
Marc Scheuner [MVP ADSI]
Guest
Posts: n/a
 
      21st Jul 2003
Folks,

Try this: if you have a stored proc on your SQL Server 2000 with a
parameter of type TEXT, and if you then use a
SqlCommandBuilder.DeriveParameters call to determine the stored proc's
parameters, you'll end up getting an entry for that parameter in
question of type "VARCHAR", with a size of 2 billion (2 GByte of
chars).

Needless to say, this doesn't work - any idea why SqlCommandBuilder
doesn't recognize TEXT parameters, and properly convert them to
parameters with a SqlDbType of "Text" ??

Anyone else seen this? We're using VS.NET 2002, with the 1.0 .NET
Framework. Hsa this been fixed in the 1.1 .NET framework maybe??

Thanks!
Marc

================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
Reply With Quote
 
 
 
 
William \(Bill\) Vaughn
Guest
Posts: n/a
 
      21st Jul 2003
Take a look at my article on the CommandBuilder. You're really better off
rolling the Command Parameters collection yourself.
http://www.betav.com/msdn_magazine.htm


--
____________________________________
Bill Vaughn
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

"Marc Scheuner [MVP ADSI]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Folks,
>
> Try this: if you have a stored proc on your SQL Server 2000 with a
> parameter of type TEXT, and if you then use a
> SqlCommandBuilder.DeriveParameters call to determine the stored proc's
> parameters, you'll end up getting an entry for that parameter in
> question of type "VARCHAR", with a size of 2 billion (2 GByte of
> chars).
>
> Needless to say, this doesn't work - any idea why SqlCommandBuilder
> doesn't recognize TEXT parameters, and properly convert them to
> parameters with a SqlDbType of "Text" ??
>
> Anyone else seen this? We're using VS.NET 2002, with the 1.0 .NET
> Framework. Hsa this been fixed in the 1.1 .NET framework maybe??
>
> Thanks!
> Marc
>
> ================================================================
> Marc Scheuner May The Source Be With You!
> Bern, Switzerland m.scheuner(at)inova.ch



 
Reply With Quote
 
Marc Scheuner [MVP ADSI]
Guest
Posts: n/a
 
      22nd Jul 2003
>Take a look at my article on the CommandBuilder. You're really better off
>rolling the Command Parameters collection yourself.


Geez.... any hope that .NET 2.0 will fix these shortcomings??

Marc

================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
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
SqlCommandBuilder.DeriveParameters returns InputOutput for Output =?Utf-8?B?V2lub25h?= Microsoft ADO .NET 3 28th Oct 2009 02:38 PM
SqlCommandBuilder DeriveParameters Ouput Arg gets wrong direction JM Microsoft ADO .NET 1 18th Apr 2008 08:22 PM
SqlCommandBuilder.DeriveParameters Permissions Mike S. Microsoft ADO .NET 5 24th Nov 2005 09:24 AM
SqlCommandBuilder.DeriveParameters against SQL 2005 Beta Sushil Chordia Microsoft ADO .NET 10 5th Sep 2004 08:55 AM
Problem with SqlCommandBuilder.DeriveParameters =?Utf-8?B?WGFuZHU=?= Microsoft ADO .NET 4 4th Mar 2004 01:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:28 AM.