Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.sql.SQLWarning: 010P4: An output parameter was received and ignored

940 views
Skip to first unread message

Sridhar_G

unread,
May 25, 2003, 5:11:01 AM5/25/03
to
Hi
I am new to Sybase , and struck up with problem.
Can u pleaes help, thanks in advance.
I am using Sybase as backend and Vb.Net as my front end
I have written a procedure for Number sequences and returning a output
parameter
I get this error code. Can You please tell me where I am going wrong.
I the code for vb.net + ADO.NET is as follows

Public Function GetNextValue(ByVal strForWhich As String) As Long
Dim oCon As New OleDbConnection()
Dim oCom As OleDbCommand
Dim cls As New DBClass()
Try
oCon = cls.OpenConnection()
oCom = New OleDbCommand("gls_GENERATORS", oCon)
oCom.CommandType = CommandType.StoredProcedure
oCom.Parameters.Add("@sequence", OleDbType.VarChar, 100).Value
= strForWhich
oCom.Parameters.Add("@sequence_id", OleDbType.Integer).Direction
= ParameterDirection.Output
oCom.ExecuteNonQuery()
GetNextValue =
Convert.ToInt64(oCom.Parameters("@sequence_id").Value)
Catch ex As Exception
Throw ex
Finally
oCom.Dispose()
oCom = Nothing
'Call the Close Connection Method .
cls.CloseConnection(oCon)
cls = Nothing
End Try
End Function

The Procedure Code is as follows.

CREATE PROCEDURE dbo.gls_GENERATORS
@sequence varchar(100),
@sequence_id INT OUTPUT
AS
BEGIN
BEGIN TRAN
UPDATE GENERATORS SET GENVALUE = GENVALUE + 1
WHERE GENDESC = UPPER(@sequence)
IF(@@ERROR = 0)
BEGIN
COMMIT TRAN
SELECT @sequence_id = GENVALUE FROM GENERATORS
WHERE UPPER(GENDESC)= UPPER(@sequence)
RETURN @sequence_id
END
ELSE
ROLLBACK TRAN
RETURN @@ERROR
END
when I execute this proc in third party tool like RapidSql I get the out
put.
But in JSQL I get the warning.
And even in the application I am developing, in the function I mention
above the proc is return DBNULL,
How can get the result. Please can u help me.
I am struck up with this.
Regards
Sridhar G
http://www.amautage.com

odbcpse

unread,
May 27, 2003, 12:03:33 PM5/27/03
to Srid...@earth.com
I am not sure why this is on the jConnect newsgroup - maybe ODBC -
also there is no ADO.NET Provider that Sybase distributes at this time.
(Sybase ASE that is - you do not specify which backend DBMS).

That error code you mention happens with jConnect and JISQL,
and ytou can turn the warnings off with the configuration menus.
ALl the warning means is that you called a stored procedure, that
returned an output parameter. It really should not be a problem.

pv

lance.a...@sun.com

unread,
Jul 7, 2003, 4:28:43 PM7/7/03
to
the reason u see this message from jisql or the isqlapp is that we print
out all of the warnings regardless.


the isql command ignores this which is why you do not see it from the
dblib/ctlib version

lance.a...@sun.com

unread,
Jul 7, 2003, 4:25:44 PM7/7/03
to

martijndebruijn

unread,
Nov 23, 2007, 8:03:16 AM11/23/07
to
The error also occurs with jdbc and the jconnect 5.5 driver.
Martijn
0 new messages