Please verify this code and let me know where i am going wrong.
when I am executing this code i am getting MCH3601 unmonitored by GETHAWB at statment 000000007. In stored procedure it is INPUT parm declaration statment.
mports System.Data
Imports System.Data.Odbc
PublicClass Form1
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim HAWB AsChar = " RG150"
Dim HAWB1 As Odbc.OdbcParameter
Dim connString AsString = "DSN=EAGLE2; UID=XXXXX;PWD=XXXXXXX;"
Dim conn As OdbcConnection = New OdbcConnection(connString)
Dim cmd As OdbcCommand = conn.CreateCommand()
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "CALL EAFWPTSTPG.GETHAWB"
Dim dr As OdbcDataReader
Dim objParameter = New OdbcParameter()
HAWB1 = cmd.Parameters.Add("@HAWB1", Odbc.OdbcType.Char, 10)
HAWB1.Direction = ParameterDirection.Input
HAWB1.Value = HAWB
Try
conn.Open()
dr = cmd.ExecuteReader
If dr.HasRows Then
MsgBox("Data")
Else
MsgBox("No Data")
EndIf
Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()
EndTry
EndSub
EndClass
Thank you very much for the help
Krishna
when I am executing this code i am getting MCH3601 unmonitored by GETHAWB at statment 000000007. In stored procedure it is INPUT parm declaration statment.
mports System.Data
Imports System.Data.Odbc
PublicClass Form1
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim HAWB AsChar = " RG150"
Dim HAWB1 As Odbc.OdbcParameter
Dim connString AsString = "DSN=EAGLE2; UID=XXXXX;PWD=XXXXXXX;"
Dim conn As OdbcConnection = New OdbcConnection(connString)
Dim cmd As OdbcCommand = conn.CreateCommand()
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "CALL EAFWPTSTPG.GETHAWB"
Dim dr As OdbcDataReader
Dim objParameter = New OdbcParameter()
HAWB1 = cmd.Parameters.Add("@HAWB1", Odbc.OdbcType.Char, 10)
HAWB1.Direction = ParameterDirection.Input
HAWB1.Value = HAWB
Try
conn.Open()
dr = cmd.ExecuteReader
If dr.HasRows Then
MsgBox("Data")
Else
MsgBox("No Data")
EndIf
Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()
EndTry
EndSub
EndClass
Thank you very much for the help
Krishna