In the.net development platform invoke the ODBC connection database and execute the stored procedure, appear the error message above,
CodePudding user response:
If you give the parameter is not correct, see literally as if you give the values of the parameters is not consistent with requirementsCodePudding user response:
I stored procedure is:CREATE PROCEDURE dbo. Get_Ssz1; 1
@ ywm char (15),
@ SSZ char (15) the output
AS
The BEGIN
Select @ SSZ=ywm from t_ss_mnl_ssz where ywm=@ ywm
END
//the.net code is:
OdbcCommand myCommand=new OdbcCommand ();
OdbcConnection MyConnection=new OdbcConnection (System. The Configuration. ConfigurationSettings. AppSettings [r]. "the conn" ToString ());
MyCommand. Connection=MyConnection;
MyConnection. The Open ();
MyCommand.Com mandText="Get_Ssz1? That?" ;
MyCommand.Com mandType=CommandType. StoredProcedure;
MyCommand. The Parameters. The Add (" @ ywm, "OdbcType. Char, 15);
MyCommand. The Parameters [0]. Value=https://bbs.csdn.net/topics/TextBox2.Text.Trim ();
MyCommand. The Parameters. The Add (" @ SSZ ", OdbcType. Char, 15);
MyCommand. The Parameters [1]. The Direction=ParameterDirection. The Output;
MyCommand. ExecuteNonQuery ();
Perform the myCommand. ExecuteNonQuery (); Out the error,
CodePudding user response:
I also met this kind of situation, very depressedCodePudding user response:
Pay attention to pick up pointsCodePudding user response:
I also want to know, is looking for this information ~ ~ ~ ~ ~CodePudding user response:
When you use your cursors and Dynamic SQL, you must make a go in the output the call after a cursor has had the opened. A call to the describe the output before the cursor is the opened can result in an illegal value in the status field of the data format structure.