View Full Version : VB.Net stored procedure example
07-09-2003, 07:54 AM
Okay, got it working now. Regards, Liam.
07-10-2003, 08:11 AM
Liam McMahon wrote: > Okay, got it working now. Liam, please help out your fellow programmers by mentioning how you fixed the problem. Bill
07-10-2003, 11:40 AM
Hi, Can anyone provide me with an example of a stored procedure call to an iSeries using VB.Net? I've tried using the VB 6 examples I've found, and can get it to call a simple stored procedure that doesn't have any parms, but when I try to add parms to the mix, I get a vague error like "SQL error returned from the server". Any practical examples out there for doing this in VB.Net Thanks in advance, Liam. <hr width=50 align=left>Code ('http://www.mcpressonline.com/mc/showcode@@.6ae71331')
07-10-2003, 11:40 AM
Hi Bill, I attach the test code I've used to get it working. This runs on a form with a list view control and three buttons to test the three access types in the code. Apologies for the messiness of the code; this is just thrown together stuff for quick testing, and not production code. In the code you'll find: 1. Call to stored procedure to get a value 2. SQL select to get a result set (not stored procedure) 3. Call to stored procedure to get a result set 4. Call to stored procedure to get/pass a numeric value This is all very VB6 / ADO like, with some syntax differences, but other than that there isn't much of a change. I think the problem I was having was in just getting the pieces in place on the PC and the AS/400 so that it all worked in concert. And now that it works, I'm really impressed with it; I've got a big client/server project to do in VB.Net, and stored procedures are going to make it so easy, I don't know if I'll even get out of bed to do it! Hope the code helps someone else, Best regards, Liam. <hr width=50 align=left>Code ('http://www.mcpressonline.com/mc/showcode@@.6ae71331/2')
07-11-2003, 06:58 AM
Liam McMahon wrote: > I think the problem I was having was in just getting the pieces in > place on the PC and the AS/400 so that it all worked in concert. > > And now that it works, I'm really impressed with it; Thanks for following up. Bill
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.