No joy so far
I've tried everything
Public Function ExecDBSizeInfo() As Integer Implements DBInfoInterface.IGetDBSpaceInfo.ExecDBSizeInfo
Try
Dim Conn As New DB2Connection
Dim val As Integer
Dim param As New DB2Parameter("Input0", DB2Type.Timestamp)
param.Value = "?"
Dim param1 As New DB2Parameter("Input1", DB2Type.BigInt)
param1.Value = "?"
Dim param2 As New DB2Parameter("Input2", DB2Type.BigInt)
param2.Value = "?"
Dim param3 As New DB2Parameter("Input3", DB2Type.Integer)
param3.Value = "0"
Dim db2Params As DB2Parameter() = {param, param1, param2, param3}
Conn.ConnectionString = DB2Helper.DB2Helper.ConnString
val = DB2Helper.DB2Helper.ExecuteNonQuery(Conn, "SYSPROC.GET_DBSIZE_INFO", db2Params)
Conn.Close()
Conn.Dispose()
ExecDBSizeInfo = val
Return ExecDBSizeInfo
Catch ex As DB2Exception
Throw ex
End Try
End Function
This did not work the function returns -1...so i tried
Public Function ExecDBSizeInfo() As Integer Implements DBInfoInterface.IGetDBSpaceInfo.ExecDBSizeInfo
Try
Dim Conn As New DB2Connection
Dim val As Integer
Dim param As New DB2Parameter("Input0", DB2Type.Timestamp)
param.Value = "?"
param.direction=parameterdirection.output
Dim param1 As New DB2Parameter("Input1", DB2Type.BigInt)
param1.Value = "?"
param.direction=parameterdirection.output
Dim param2 As New DB2Parameter("Input2", DB2Type.BigInt)
param2.Value = "?"
param.direction=parameterdirection.output
Dim param3 As New DB2Parameter("Input3", DB2Type.Integer)
param3.Value = "0"
param.direction=parameterdirection.Input
Dim db2Params As DB2Parameter() = {param, param1, param2, param3}
Conn.ConnectionString = DB2Helper.DB2Helper.ConnString
val = DB2Helper.DB2Helper.ExecuteNonQuery(Conn, "SYSPROC.GET_DBSIZE_INFO", db2Params)
Conn.Close()
Conn.Dispose()
ExecDBSizeInfo = val
Return ExecDBSizeInfo
Catch ex As DB2Exception
Throw ex
End Try
End Function
Still NO SUCCESS, Function returns -1, I even tried removing the param.value bits, and still no success. Slowly tearing my hair out. Looked at the spClient.VB and i'm reasonably sure they are doing much the same as me, yet i can't figure out why mine doesn't work. If anyone has any .NET experience using stored procedures especially system stored procedures I'd like to know what i'm doing wrong
Can anyone help me understand what is going wrong?
If the function executes successfully I should get 0 (zero) as the result of the funtion. Currently i get
-1(negative one),meaning the SYSPROC.GET_DBSIZE_INFO is not executing successfully.
Can anyone help me understand what is going wrong?