PC Review


Reply
Thread Tools Rate Thread

Data access application block

 
 
Martin Bischoff
Guest
Posts: n/a
 
      25th Jul 2003
Hi,

I'm using the SqlHelper class from microsofts data access application
block and have problems when trying to call a stored procedure that has
a TEXT parameter.

I'm using the following environment:
- SQL Server 2000 SP3a + Cumulative Patch (July 2003)
- .NET 1.0
- Data Access Application Block 1.0

The method SqlHelperParameterCache.DiscoverSpParameterSet returns a
SqlParameter with SqlDbType set to VarChar and Size set to
Int32.MaxValue. The problem seems to be in
SqlCommandBuilder.DeriveParameters.

When calling the stored procedure with the automatically discovered
parameter set, I get an SqlException with one of the following messages:
- General network error. Check your network documentation.
- A severe error occurred on the current command. The results, if any,
should be discarded.

In the servers event log, I can find the following error:

Event Type: Error
Event Source: MSSQL$MYSERVER
Event Category: (2)
Event ID: 17052
Date: 25.07.2003
Time: 16:33:35
User: N/A
Computer: MYSERVER
Description:
Error: 17805, Severity: 20, State: 3
Invalid buffer received from client.
Data:
....


After reading some newsgroup posts, it seems to me that the problem also
occurrs when using binary data. Is there a fix for these problems?


Thanks,
Martin Bischoff

 
Reply With Quote
 
 
 
 
Wayne Wengert
Guest
Posts: n/a
 
      29th Jul 2003
Where can I find the Data Access Application Block? A search on MSDN came up
blank?

Wayne

"Scot Rose [MSFT]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The Application Blocks for .NET are designed to jumpstart development of

..NET distributed applications. The sample code and documentation is provided
"as-is."
> While it has undergone testing and is considered a robust code set, there

could be problems that were not found in that testing... Since the code is
available, you could (As you
> have done with teh Text problem) work around these problems. There are not

any plans that I am aware of to update these samples in the near future.
>
> Want to know more? Check out the MSDN Library at http://msdn.microsoft.com

or the Microsoft Knowledge Base at http://support.microsoft.com
>
> Scot Rose, MCSD
> Microsoft Visual Basic Developer Support
> Email : (E-Mail Removed) <Remove word online. from address>
>
> This posting is provided "AS IS", with no warranties, and confers no

rights.
>
>
>
>
> --------------------
> >From: Martin Bischoff <(E-Mail Removed)>
> >Newsgroups: microsoft.public.dotnet.framework.adonet
> >Subject: Data access application block
> >Date: Fri, 25 Jul 2003 16:58:35 +0200
> >Lines: 46
> >Message-ID: <bfrgis$ic9vp$(E-Mail Removed)>
> >NNTP-Posting-Host: 194.209.202.80
> >Mime-Version: 1.0
> >Content-Type: text/plain; charset=us-ascii; format=flowed
> >Content-Transfer-Encoding: 7bit
> >X-Trace: news.uni-berlin.de 1059145116 19277817 194.209.202.80 (16

[159841])
> >User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4)

Gecko/20030624
> >X-Accept-Language: de-ch, de, en-us, en
> >Path:

cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.co
m!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!
> 194.209.202.80!not-for-mail
> >Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.adonet:56716
> >X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
> >
> >Hi,
> >
> >I'm using the SqlHelper class from microsofts data access application
> >block and have problems when trying to call a stored procedure that has
> >a TEXT parameter.
> >
> >I'm using the following environment:
> >- SQL Server 2000 SP3a + Cumulative Patch (July 2003)
> >- .NET 1.0
> >- Data Access Application Block 1.0
> >
> >The method SqlHelperParameterCache.DiscoverSpParameterSet returns a
> >SqlParameter with SqlDbType set to VarChar and Size set to
> >Int32.MaxValue. The problem seems to be in
> >SqlCommandBuilder.DeriveParameters.
> >
> >When calling the stored procedure with the automatically discovered
> >parameter set, I get an SqlException with one of the following messages:
> >- General network error. Check your network documentation.
> >- A severe error occurred on the current command. The results, if any,
> >should be discarded.
> >
> >In the servers event log, I can find the following error:
> >
> >Event Type: Error
> >Event Source: MSSQL$MYSERVER
> >Event Category: (2)
> >Event ID: 17052
> >Date: 25.07.2003
> >Time: 16:33:35
> >User: N/A
> >Computer: MYSERVER
> >Description:
> >Error: 17805, Severity: 20, State: 3
> >Invalid buffer received from client.
> >Data:
> >...
> >
> >
> >After reading some newsgroup posts, it seems to me that the problem also
> >occurrs when using binary data. Is there a fix for these problems?
> >
> >
> >Thanks,
> >Martin Bischoff
> >
> >

>
>



 
Reply With Quote
 
Wayne Wengert
Guest
Posts: n/a
 
      29th Jul 2003
Never mind - I found it with a Google search -
http://microsoft.com/downloads/detai...displaylang=en

Wayne

"Wayne Wengert" <(E-Mail Removed)> wrote in message
news:Op%(E-Mail Removed)...
> Where can I find the Data Access Application Block? A search on MSDN came

up
> blank?
>
> Wayne
>
> "Scot Rose [MSFT]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > The Application Blocks for .NET are designed to jumpstart development of

> .NET distributed applications. The sample code and documentation is

provided
> "as-is."
> > While it has undergone testing and is considered a robust code set,

there
> could be problems that were not found in that testing... Since the code is
> available, you could (As you
> > have done with teh Text problem) work around these problems. There are

not
> any plans that I am aware of to update these samples in the near future.
> >
> > Want to know more? Check out the MSDN Library at

http://msdn.microsoft.com
> or the Microsoft Knowledge Base at http://support.microsoft.com
> >
> > Scot Rose, MCSD
> > Microsoft Visual Basic Developer Support
> > Email : (E-Mail Removed) <Remove word online. from address>
> >
> > This posting is provided "AS IS", with no warranties, and confers no

> rights.
> >
> >
> >
> >
> > --------------------
> > >From: Martin Bischoff <(E-Mail Removed)>
> > >Newsgroups: microsoft.public.dotnet.framework.adonet
> > >Subject: Data access application block
> > >Date: Fri, 25 Jul 2003 16:58:35 +0200
> > >Lines: 46
> > >Message-ID: <bfrgis$ic9vp$(E-Mail Removed)>
> > >NNTP-Posting-Host: 194.209.202.80
> > >Mime-Version: 1.0
> > >Content-Type: text/plain; charset=us-ascii; format=flowed
> > >Content-Transfer-Encoding: 7bit
> > >X-Trace: news.uni-berlin.de 1059145116 19277817 194.209.202.80 (16

> [159841])
> > >User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4)

> Gecko/20030624
> > >X-Accept-Language: de-ch, de, en-us, en
> > >Path:

>

cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.co
> m!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!
> > 194.209.202.80!not-for-mail
> > >Xref: cpmsftngxa06.phx.gbl

microsoft.public.dotnet.framework.adonet:56716
> > >X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
> > >
> > >Hi,
> > >
> > >I'm using the SqlHelper class from microsofts data access application
> > >block and have problems when trying to call a stored procedure that has
> > >a TEXT parameter.
> > >
> > >I'm using the following environment:
> > >- SQL Server 2000 SP3a + Cumulative Patch (July 2003)
> > >- .NET 1.0
> > >- Data Access Application Block 1.0
> > >
> > >The method SqlHelperParameterCache.DiscoverSpParameterSet returns a
> > >SqlParameter with SqlDbType set to VarChar and Size set to
> > >Int32.MaxValue. The problem seems to be in
> > >SqlCommandBuilder.DeriveParameters.
> > >
> > >When calling the stored procedure with the automatically discovered
> > >parameter set, I get an SqlException with one of the following

messages:
> > >- General network error. Check your network documentation.
> > >- A severe error occurred on the current command. The results, if any,
> > >should be discarded.
> > >
> > >In the servers event log, I can find the following error:
> > >
> > >Event Type: Error
> > >Event Source: MSSQL$MYSERVER
> > >Event Category: (2)
> > >Event ID: 17052
> > >Date: 25.07.2003
> > >Time: 16:33:35
> > >User: N/A
> > >Computer: MYSERVER
> > >Description:
> > >Error: 17805, Severity: 20, State: 3
> > >Invalid buffer received from client.
> > >Data:
> > >...
> > >
> > >
> > >After reading some newsgroup posts, it seems to me that the problem

also
> > >occurrs when using binary data. Is there a fix for these problems?
> > >
> > >
> > >Thanks,
> > >Martin Bischoff
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Martin Bischoff
Guest
Posts: n/a
 
      4th Aug 2003
One more question about the bug in SqlCommandBuilder.DeriveParameters():

Does the problem only occur for parameters of type TEXT, or also for
other types?

Thanks,
Martin Bischoff


Scot Rose [MSFT] wrote:

> I was able to locate some information on this, and yes it is a bug in the SqlCommandBuilder.DeriveParameters() and setting the type after it is retrieved to SqlDbType.Text is the
> only currently available workaround (As you found). No current time fram for a fix (Whether it will be in a Service pack or future release of the framework)
>
> Want to know more? Check out the MSDN Library at http://msdn.microsoft.com or the Microsoft Knowledge Base at http://support.microsoft.com
>
> Scot Rose, MCSD
> Microsoft Visual Basic Developer Support
> Email : (E-Mail Removed) <Remove word online. from address>
>
> This posting is provided “AS IS”, with no warranties, and confers no rights.
>
>
>
>
> --------------------
>
>>From: Martin Bischoff <(E-Mail Removed)>
>>Newsgroups: microsoft.public.dotnet.framework.adonet
>>Subject: Re: Data access application block
>>Date: Tue, 29 Jul 2003 08:40:30 +0200
>>Lines: 33
>>Message-ID: <bg54u9$kp643$(E-Mail Removed)>
>>References: <bfrgis$ic9vp$(E-Mail Removed)> <(E-Mail Removed)>
>>NNTP-Posting-Host: exchange.twi-ag.ch (194.209.202.80)
>>Mime-Version: 1.0
>>Content-Type: text/plain; charset=windows-1252; format=flowed
>>Content-Transfer-Encoding: 8bit
>>X-Trace: news.uni-berlin.de 1059460873 21796995 194.209.202.80 (16 [159841])
>>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
>>X-Accept-Language: de-ch, de, en-us, en
>>In-Reply-To: <(E-Mail Removed)>
>>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!fu-berlin.de!uni-berlin.de!exchange.twi-ag.CH!not-for-

>
> mail
>
>>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.adonet:56935
>>X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
>>
>>Thanks Scot,
>>
>>what you say is true, and I'm glad microsoft releases application blocks
>>to help jumpstart development.
>>
>>But in this case, it seems that it isn't a problem in the application
>>block, but in the .NET framework class library. I mean, it is
>>SqlCommandBuilder.DeriveParameters() which returns wrong parameter types
>>for stored procedures (VarChar instead of TEXT).
>>
>>Will this method also return wrong parameter types in other cases? And
>>will it be fixed (for .NET 1.0)?
>>
>>Best regards,
>>Martin Bischoff
>>
>>
>>Scot Rose [MSFT] wrote:
>>
>>>The Application Blocks for .NET are designed to jumpstart development of .NET distributed applications. The sample code and documentation is provided "as-is."
>>>While it has undergone testing and is considered a robust code set, there could be problems that were not found in that testing... Since the code is available, you could (As you
>>>have done with teh Text problem) work around these problems. There are not any plans that I am aware of to update these samples in the near future.
>>>
>>>Want to know more? Check out the MSDN Library at http://msdn.microsoft.com or the Microsoft Knowledge Base at http://support.microsoft.com
>>>
>>>Scot Rose, MCSD
>>>Microsoft Visual Basic Developer Support
>>>Email : (E-Mail Removed) <Remove word online. from address>
>>>
>>>This posting is provided “AS IS”, with no warranties, and confers no rights.
>>>
>>>
>>>

>>
>>

>
>


 
Reply With Quote
 
Scot Rose [MSFT]
Guest
Posts: n/a
 
      4th Aug 2003
I only saw the mention for text in what I read.

Want to know more? Check out the MSDN Library at http://msdn.microsoft.com or the Microsoft Knowledge Base at http://support.microsoft.com

Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : (E-Mail Removed) <Remove word online. from address>

This posting is provided “AS IS”, with no warranties, and confers no rights.




--------------------
>From: Martin Bischoff <(E-Mail Removed)>
>Newsgroups: microsoft.public.dotnet.framework.adonet
>Subject: Re: Data access application block
>Date: Mon, 04 Aug 2003 09:19:25 +0200
>Lines: 87
>Message-ID: <bgl1du$pq9c7$(E-Mail Removed)>
>References: <bfrgis$ic9vp$(E-Mail Removed)> <(E-Mail Removed)> <bg54u9$kp643$(E-Mail Removed)>

<(E-Mail Removed)>
>NNTP-Posting-Host: exchange.twi-ag.ch (194.209.202.80)
>Mime-Version: 1.0
>Content-Type: text/plain; charset=windows-1252; format=flowed
>Content-Transfer-Encoding: 8bit
>X-Trace: news.uni-berlin.de 1059981566 27075975 194.209.202.80 (16 [159841])
>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
>X-Accept-Language: de-ch, de, en-us, en
>In-Reply-To: <(E-Mail Removed)>
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!exchange.twi-ag.CH!not-for-mail
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.adonet:57355
>X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
>
>One more question about the bug in SqlCommandBuilder.DeriveParameters():
>
>Does the problem only occur for parameters of type TEXT, or also for
>other types?
>
>Thanks,
>Martin Bischoff
>
>
>Scot Rose [MSFT] wrote:
>
>> I was able to locate some information on this, and yes it is a bug in the SqlCommandBuilder.DeriveParameters() and setting the type after it is retrieved to SqlDbType.Text is

the
>> only currently available workaround (As you found). No current time fram for a fix (Whether it will be in a Service pack or future release of the framework)
>>
>> Want to know more? Check out the MSDN Library at http://msdn.microsoft.com or the Microsoft Knowledge Base at http://support.microsoft.com
>>
>> Scot Rose, MCSD
>> Microsoft Visual Basic Developer Support
>> Email : (E-Mail Removed) <Remove word online. from address>
>>
>> This posting is provided “AS IS”, with no warranties, and confers no rights.
>>
>>
>>
>>
>> --------------------
>>
>>>From: Martin Bischoff <(E-Mail Removed)>
>>>Newsgroups: microsoft.public.dotnet.framework.adonet
>>>Subject: Re: Data access application block
>>>Date: Tue, 29 Jul 2003 08:40:30 +0200
>>>Lines: 33
>>>Message-ID: <bg54u9$kp643$(E-Mail Removed)>
>>>References: <bfrgis$ic9vp$(E-Mail Removed)> <(E-Mail Removed)>
>>>NNTP-Posting-Host: exchange.twi-ag.ch (194.209.202.80)
>>>Mime-Version: 1.0
>>>Content-Type: text/plain; charset=windows-1252; format=flowed
>>>Content-Transfer-Encoding: 8bit
>>>X-Trace: news.uni-berlin.de 1059460873 21796995 194.209.202.80 (16 [159841])
>>>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
>>>X-Accept-Language: de-ch, de, en-us, en
>>>In-Reply-To: <(E-Mail Removed)>
>>>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!fu-berlin.de!uni-berlin.de!exchange.twi-ag.CH!not-for-

>>
>> mail
>>
>>>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.adonet:56935
>>>X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
>>>
>>>Thanks Scot,
>>>
>>>what you say is true, and I'm glad microsoft releases application blocks
>>>to help jumpstart development.
>>>
>>>But in this case, it seems that it isn't a problem in the application
>>>block, but in the .NET framework class library. I mean, it is
>>>SqlCommandBuilder.DeriveParameters() which returns wrong parameter types
>>>for stored procedures (VarChar instead of TEXT).
>>>
>>>Will this method also return wrong parameter types in other cases? And
>>>will it be fixed (for .NET 1.0)?
>>>
>>>Best regards,
>>>Martin Bischoff
>>>
>>>
>>>Scot Rose [MSFT] wrote:
>>>
>>>>The Application Blocks for .NET are designed to jumpstart development of .NET distributed applications. The sample code and documentation is provided "as-is."
>>>>While it has undergone testing and is considered a robust code set, there could be problems that were not found in that testing... Since the code is available, you could (As

you
>>>>have done with teh Text problem) work around these problems. There are not any plans that I am aware of to update these samples in the near future.
>>>>
>>>>Want to know more? Check out the MSDN Library at http://msdn.microsoft.com or the Microsoft Knowledge Base at http://support.microsoft.com
>>>>
>>>>Scot Rose, MCSD
>>>>Microsoft Visual Basic Developer Support
>>>>Email : (E-Mail Removed) <Remove word online. from address>
>>>>
>>>>This posting is provided “AS IS”, with no warranties, and confers no rights.
>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
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
Data Access Application Block =?Utf-8?B?Tmljaw==?= Microsoft Dot NET 2 3rd Aug 2005 04:33 PM
How about Data Access Application Block ad Microsoft C# .NET 4 1st Mar 2005 05:34 AM
Data access application block 3 Eric Sabine Microsoft C# .NET 2 8th Sep 2004 04:37 PM
Data Access Application block and COM+ =?Utf-8?B?b3R0bw==?= Microsoft ADO .NET 3 4th Jun 2004 10:23 AM
Data Access Application Block ? Rajesh Madhra Microsoft ASP .NET 1 9th Jul 2003 10:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:49 PM.