A
abefuzzleduser2
I have a two column table (identity and ntext) setup to be used by
spro0c and vb.net. I can not get this select sproc to work from vb.net
but I can exec the sproc by itself? So it must be my sproc params?
I was selecting ntext through sproc and vb.net I have tried several
things in sproc definition and looked on groups. My ntext will be for
serialized xml about 10k to 20k. I just inserted some dummy text
values for testing.
"SqlException:A severe error occurred on the current command."
Error: 17805, Severity: 20, State: 3 Invalid buffer received from
client. SQL2000SP3,
CREATE TABLE IQ] (
[InstallQuoteID] [int] IDENTITY (1, 1) NOT NULL ,
[InstallQuoteXML] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
--------------------
CREATE PROCEDURE usp_tblInstallQuote_Select
(
@Identity int,
@InstallQuoteXML ntext OUTPUT
)
AS
SET NOCOUNT ON;
Select InstallQuoteXML
from tblInstallQuote
where InstallQuoteID = @Identity
GO
---- vb.net code from select
' IDENTITY Input
sProcCmd3.Parameters.Add("@Identity", SqlDbType.Int)
sProcCmd3.Parameters("@Identity").Value = rowid
sProcCmd3.Parameters("@Identity").Direction =
ParameterDirection.Input
' add itemnmbr xml parameter OUTPUT
sProcCmd3.Parameters.Add("@InstallQuoteXML", SqlDbType.NText,
1073741823)
sProcCmd3.Parameters("@InstallQuoteXML").Value = New
System.Data.SqlTypes.SqlString(Nothing)
sProcCmd3.Parameters("@InstallQuoteXML").Direction =
ParameterDirection.Output
Dim rowstr As String
* sProcCmd3.ExecuteScalar()
rowstr = CType(sProcCmd3.Parameters("@InstallQuoteXML").Value,
String)
-------------------------------
Source Error:
Line 48: sProcCmd3.Parameters("@InstallQuoteXML").Direction =
ParameterDirection.Output
Line 49: Dim rowstr As String
Line 50: sProcCmd3.ExecuteScalar()
Line 51: 'rowstr =
CType(sProcCmd3.Parameters("@InstallQuoteXML").Value, String)
Line 52: 'Response.Write("row ftn=" & rowstr)
Source File: C:\Inetpub\wwwroot\INTRA0514\InstallQuoteDAL.vb Line:
50
Stack Trace:
[SqlException: A severe error occurred on the current command. The
results, if any, should be discarded.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteScalar() +177
INTRA0514.InstallQuoteDAL.DbSelect(Int32 rowid) in
C:\Inetpub\wwwroot\INTRA0514\InstallQuoteDAL.vb:50
INTRA0514.InstallQuote.btnSave_Click(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\INTRA0514\InstallQuote.aspx.vb:300
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+33
System.Web.UI.Page.ProcessRequestMain() +1277
spro0c and vb.net. I can not get this select sproc to work from vb.net
but I can exec the sproc by itself? So it must be my sproc params?
I was selecting ntext through sproc and vb.net I have tried several
things in sproc definition and looked on groups. My ntext will be for
serialized xml about 10k to 20k. I just inserted some dummy text
values for testing.
"SqlException:A severe error occurred on the current command."
Error: 17805, Severity: 20, State: 3 Invalid buffer received from
client. SQL2000SP3,
CREATE TABLE IQ] (
[InstallQuoteID] [int] IDENTITY (1, 1) NOT NULL ,
[InstallQuoteXML] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
--------------------
CREATE PROCEDURE usp_tblInstallQuote_Select
(
@Identity int,
@InstallQuoteXML ntext OUTPUT
)
AS
SET NOCOUNT ON;
Select InstallQuoteXML
from tblInstallQuote
where InstallQuoteID = @Identity
GO
---- vb.net code from select
' IDENTITY Input
sProcCmd3.Parameters.Add("@Identity", SqlDbType.Int)
sProcCmd3.Parameters("@Identity").Value = rowid
sProcCmd3.Parameters("@Identity").Direction =
ParameterDirection.Input
' add itemnmbr xml parameter OUTPUT
sProcCmd3.Parameters.Add("@InstallQuoteXML", SqlDbType.NText,
1073741823)
sProcCmd3.Parameters("@InstallQuoteXML").Value = New
System.Data.SqlTypes.SqlString(Nothing)
sProcCmd3.Parameters("@InstallQuoteXML").Direction =
ParameterDirection.Output
Dim rowstr As String
* sProcCmd3.ExecuteScalar()
rowstr = CType(sProcCmd3.Parameters("@InstallQuoteXML").Value,
String)
-------------------------------
Source Error:
Line 48: sProcCmd3.Parameters("@InstallQuoteXML").Direction =
ParameterDirection.Output
Line 49: Dim rowstr As String
Line 50: sProcCmd3.ExecuteScalar()
Line 51: 'rowstr =
CType(sProcCmd3.Parameters("@InstallQuoteXML").Value, String)
Line 52: 'Response.Write("row ftn=" & rowstr)
Source File: C:\Inetpub\wwwroot\INTRA0514\InstallQuoteDAL.vb Line:
50
Stack Trace:
[SqlException: A severe error occurred on the current command. The
results, if any, should be discarded.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteScalar() +177
INTRA0514.InstallQuoteDAL.DbSelect(Int32 rowid) in
C:\Inetpub\wwwroot\INTRA0514\InstallQuoteDAL.vb:50
INTRA0514.InstallQuote.btnSave_Click(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\INTRA0514\InstallQuote.aspx.vb:300
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+33
System.Web.UI.Page.ProcessRequestMain() +1277