473,756 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calling AS400 program from vb.net

Sam
Here is what I'm currently doing.

'Global variable set in the form load
Private g_cnnISeries As New IBM.Data.DB2.iS eries.iDB2Conne ction

Dim cmdAddData As New IBM.Data.DB2.iS eries.iDB2Comma nd
cmdAddData .Connection = g_cnnISeries
cmdAddData .CommandText = "call mydatalibrary.Q CMDEXC('call
PGM(ADDDATA) PARM(3, 'ABC')"

g_cnnISeries.Op en()
If g_cnnISeries.St ate = ConnectionState .Open Then
cmdAddBenefits. ExecuteNonQuery ()
g_cnnISeries.Cl ose()
End If

I get an error saying the sql text in not valid. I am able to do a
select statement and insert SQL statement into the database, but this
is a program I want to call, so I'm not exactly sure what the syntax
should be. I've just guessed based on what I could find on the net.

I want to call the program ADDDATA and pass 2 parameters: 3 (integer)
and ABC (string).

Thanks...

Sep 4 '07 #1
0 1721

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5345
by: Niyazi | last post by:
Hi, I have to retrieve a data from AS400 DB2 and after working with data I have to export into one of existing Excel file. I can connect into specific library in AS400 DB2 using AS400 Client-Access v5.2 program using (in VB.NET) ODBC driver (DSN Name …) . I can retrieve datam work on it using VB.NET and I can send into 'NEW' Excel file. My first problem starts here:
6
2741
by: Niyazi | last post by:
Hi, We have and IBM AS400 and I belive the reional setting is Turkish. The IBM Client-Access for Windows that install in our PC (WIN XP SP2) set to Turkish characters. Now my PC has English (US) regional setting and I am not having any problem to connect. But If I change my PC Regional setting to Turkish all of my VB.NET code is
0
413
by: alan_sec | last post by:
Hi. Does the com.ibm.as400.access.AS400JDBCDriver driver that is part of JTOpen (http://jt400.sourceforge.net) works with db2 udb version 7 that is installed on windows 2000? I' m trying to access db2 from java aplication like this: Class.forName("com.ibm.as400.access.AS400JDBCDriver"); Connection connection = DriverManager.getConnection("jdbc:as400://hostname","user","password");
0
1452
by: Manuel Arroba | last post by:
asp.net oledb command parameter error calling an as400 program Hi... I have an as400 program that I can call it directly and it works: variable= "xxxx" sql = "CALL METSIGOP.SIGOPRC ('" + variable + "')" Dim con As OleDbConnection Dim cmd As OleDbCommand con = New OleDbConnection()
1
9527
by: Scott Johnson | last post by:
Hi Does anyone know how to execute a program on an AS400 from Visual Basic? I have no problem inserting data into the tables (files) on the as400, but I need to execute a program on there to process the data. (I can't use triggers either) The command I need to execute on the as400 is CALL PGM(RNRB18) PARM(01 01)
0
927
by: Brad Allison | last post by:
I posted the following yesterday and then I was asked to put AS400 in the subject: I have an ODBC data adapter going to tables on an AS400. This works - albeit slowly as our database is about 10 GB of information - in one program that I am creating but now I am starting a new project and when I try to create the data adapter I am getting "Object reference not set to an instance of an object". I am using the wizard to create the adapter...
4
3728
by: Brad Allison | last post by:
I posted this to the adonet newsgroup and was recommended to post here. Thank you for any help: Okay, I need a bit of advice. I have an ODBC data adapter being filled by AS400 which is very slow. If I were they user I would think that the computer locked and try to stop the program, reboot, whatever. So because management is still "investingating" ways of getting a faster connection from our primary AS400 (which will never go away)...
0
1473
by: davidhagay | last post by:
I wrote java program compiled it on NT machine It runs ok under linux/hpux/as400 except as400 with ccsid 5026 What is the problem with ccsid 5026(japanese) ? My machine is as400 5.2
0
2235
by: sunrt | last post by:
We have an As400 system that has program which executes batch files which resides on the SQL server 7.0 computer . Those batch files run SQL server jobs using isql. The whole idea about this is when ever some jobs will run on As400 to populate some files the program will be called to execute the batch files which will run the sql jobs to populate sql tables. This process working fine. But now we have installed SQL 2005 and trying to move ....
0
9455
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10031
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9838
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7242
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5140
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3354
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.