ERROR [HY000] [INTERSOLV][ODBC SQL Server driver][SQL Server]ct_param(): user api layer: external error: An illegal value of 1024 was placed in the status field of the CS_DATAFMT structure.
在.net開發平臺中呼叫ODBC 連接資料庫。執行存盤程序,出現以上錯誤提示。
uj5u.com熱心網友回復:
是不是你給的引數不正確阿,看字面意思好像是你給的引數值與要求的不相符uj5u.com熱心網友回復:
我的存盤程序是:CREATE PROCEDURE dbo.Get_Ssz1;1
@ywm char(15),
@ssz char(15) output
AS
BEGIN
select @ssz=ywm from t_ss_mnl_ssz where ywm=@ywm
END
//.net代碼是:
OdbcCommand myCommand =new OdbcCommand();
OdbcConnection MyConnection=new OdbcConnection(System.Configuration.ConfigurationSettings.AppSettings["conn"].ToString());
myCommand.Connection =MyConnection;
MyConnection.Open();
myCommand.CommandText="Get_Ssz1 ?,?";
myCommand.CommandType=CommandType.StoredProcedure;
myCommand.Parameters.Add("@ywm",OdbcType.Char,15);
myCommand.Parameters[0].Value=https://bbs.csdn.net/topics/TextBox2.Text.Trim();
myCommand.Parameters.Add("@ssz",OdbcType.Char,15);
myCommand.Parameters[1].Direction=ParameterDirection.Output;
myCommand.ExecuteNonQuery();
執行到myCommand.ExecuteNonQuery();就出那個錯誤。
uj5u.com熱心網友回復:
我也遇到了這種情況,很郁悶uj5u.com熱心網友回復:
關注 接分uj5u.com熱心網友回復:
我也想知道,正在找這方面的資料~~~~~uj5u.com熱心網友回復:
when you use cursors and Dynamic SQL, you must make a describe output call after a cursor has been opened. A call to describe output before the cursor is opened can result in an illegal value in the status field of the data format structure.轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/110637.html
標籤:數據庫相關
上一篇:急需PowerBuilder分布式網路應用技術電子版
下一篇:奇怪的問題:A SQLServer request resulted in a bad return code or status but no error massage was returned
