By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,763 Members | 1,641 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,763 IT Pros & Developers. It's quick & easy.

Invalid Buffer Error (Hotfix 815494) and ADO.NET and Framework 1.0

P: n/a
Hi,

FYI,

We were able to fix a problem we had with SQLServer after Hotfix
815495 was installed.

Our application, written in VB.NET, with ADO.NET under .NET framework
1.0, would generate an SQL exception of "General network error" or "A
severe error occured on the current command. The Results, if any,
should be discarded". At the same time this error would occur in the
application, an exception would occur in SQL Server and the message
would be "Invalid buffer".

Our application would not generate the exception if run under .NET
framework 1.1, but we would have a bunch of other problems with
Crystal Reports.

The error would occur with inserts on that specific table that had a
field of type "Text". A thorough investigation revealed that the
Adapters created by the VS.NET Code Generators (dragging og an
SQLadapter Icon onto a Web Page or a Data Access Component) would be
generated with code that generate that error.

The Update Command as well as the Insert Command Parameters would
have that field defined as a System.Data.SqlDbType.VarChar(2147483647)
instead of System.Data.SqlDbType.Text. The Changing to
"System.Data.SqlDbType.Text" fixed the problem WITHOUT having to
migrate to the .NET Framework 1.1.

Regards

JFG

PS. The Knowledge base from Microsoft as well as their MSDN site are
totally silent on that topic... If anybody from Microsoft reads this,
Please update your site appropriately.
Jul 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.