473,387 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Using a Stored Procedure to Update data on AS400 DB2 database from VB.NET application

Hello -

I am writing VB.NET applications. We have a SQL Server 2005 environment and also many applications running on the AS400 using DB2 databases. I like to use Stored Procedures any time I do SELECT, UPDATE, DELETE, INSERT into databases.

We have the IBM DB2 for i5/OS .NET Provider V6R1. We use Visual Studio 2005.

I have written a number of stored procedures on the AS400 DB2 which SELECT data. I am having no trouble successfully running these stored procedures (containing SELECT statements) from a VB.NET application.

I ran into difficulty when I tried to call a stored procedure that contains UPDATE statements. I can run the same update statements from the System i Navigator just fine, but when I try to run the stored procedure from VB.NET I receive the following error -

AS400 DB2 Exception SQL7008 DELORDP in SLDATATEST not valid for operation.

DELORDP is my tablename and SLDATATEST is my Library name.

I found a question that someone else posted which asked about journaling and UPDATEs from stored procedures. There was no response to this gentleman's question. I decided to ask our AS400 gurus if they could turn journaling on for the table in question, then I ran my VB.NET application again and this time I did not get an error and when I queried the data, sure enough, it had been updated through my stored procedure.

My question is this - apparently, turning on the journaling worked for me, BUT, is there any OTHER solution besides turning on journaling for tables that we need to be able to UPDATE/DELETE/INSERT through stored procedures?

Thanks in advance for any advice or solutions offered.

Best regards,
Patricia
Mar 5 '10 #1
0 2936

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
1
by: Roman Prigozhin | last post by:
Hi all, I have one stored procedure where I defined 3 temporary tables, which i return back to java. I want to have 3 separate sub procedures which would go after the data and fill out these...
6
by: Wojciech Wendrychowicz | last post by:
Hello to All, I'm trying to retrieve records from AS/400 in an VBA application. So, I've made an RPG program, then a stored procedure wchich calls that RPG program, and finally some VBA code to...
9
by: joun | last post by:
Hi all, i'm using this code to insert records into an Access table from asp.net, using a stored procedure, called qry_InsertData: PARAMETERS Long, Long, Text(20), Long, DateTime; INSERT...
1
by: j090757 | last post by:
Returning parm data to vb.net from AS400 stored procedure This example loads a textbox which is used by javascript for error handling. First create the stored procedure on the AS400: CREATE...
7
by: Siv | last post by:
Hi, I have a stored procedure that I want to execute and then wait in a loop showing a timer whilst it completes and then carry on once I get notification that it has completed. The main reason...
2
by: syntego | last post by:
We commonly use triggers to log changes to our main tables to historical log tables. In the trigger, we create a concatenated string of the old values by casting them as follows: ...
0
by: bobby_b_ | last post by:
Hello, I'm trying to access a stored procedure on our AS400 that is written in RPG. I know that the stored procedure works (I've called it from an RPG program on the AS400), and I know that the...
1
by: sheenaa | last post by:
Hello Members, I m creating my application forms in ASP.Net 2005 C# using the backend SQL Server 2005. What i have used on forms :: ? On my first form i have used some...
6
by: insirawali | last post by:
Hi all, I have this problem, i need to know is there a way i cn use the data adapter's update method in this scenario. i have 3 tables as below create table table1{ id1 int identity(1,1)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.