TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Krishna
NA
1
0
Calling AS/400 (Iseries) Stored Procedure from VB.NET using ODBC
Mar 26 2006 7:07 PM
Please verify this code and let me know where i am going wrong.
This is my first VB.NET program. I am a AS/400 application developer.
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.
Imports
System.Data
Imports
System.Data.Odbc
Public
Class
Form1
Private
Sub
Button1_Click(
ByVal
sender
As
System.Object,
ByVal
e
As
System.EventArgs)
Handles
Button1.Click
Dim
HAWB
As
Char
=
" RG150"
Dim
HAWB1
As
Odbc.OdbcParameter
Dim
connString
As
String
=
"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"
)
End
If
Catch
ex
As
Exception
MsgBox(ex.Message)
Finally
conn.Close()
End
Try
End
Sub
End
Class
Thank you very much for the help
Krishna
Reply
Answers (
0
)
IntPtr in c#
I am a New leaner of .NET need guidance