Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old March 26th, 2006, 07:30 PM
Registered User
Join Date: Mar 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calling Stored procedure in VB.NET

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.

Imports 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
Dim dr As OdbcDataReader
Dim objParameter = New OdbcParameter()
HAWB1 = cmd.Parameters.Add("@HAWB1", Odbc.OdbcType.Char, 10)
HAWB1.Direction = ParameterDirection.Input
HAWB1.Value = HAWB


dr = cmd.ExecuteReader
If dr.HasRows Then
MsgBox("No Data")

Catch ex As Exception


Thank you very much for the help


Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
calling stored procedure jomet JSP Basics 0 November 23rd, 2007 07:06 AM
Calling Stored Procedure with parameters zarina_24 Classic ASP Professional 4 March 2nd, 2006 10:57 AM
VB calling DB2 stored procedure sangsri VB How-To 1 July 13th, 2005 08:55 AM
Calling AS/400 Stored Procedures from VB.NET prasanthknair ADO.NET 0 January 19th, 2005 05:55 AM
Calling a stored procedure in Crystal .net sureshbabu Crystal Reports 0 January 8th, 2005 04:32 AM

All times are GMT -4. The time now is 03:28 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.