Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields...
Go Back  Xtreme Visual Basic Talk > > > Displaying and Updating multiple DB fields...


Reply
 
Thread Tools Display Modes
  #1  
Old 02-08-2013, 10:21 AM
Shisno Shisno is offline
Newcomer
 
Join Date: Jan 2013
Posts: 11
Default Displaying and Updating multiple DB fields...


Ok, so I'm working with IBM.Data.DB2.iSeries to create VB programs relying on the AS400 IBM system... (PITA).

Long story short, I've run into a DB with 3 values, 2 of which are keys

RUL(key), SEQ(key), RED


Basically, it happens like this...

RUL
SEQ(0,1,2,3,..)
SEQ.1: RED
SEQ.2: RED
SEQ.3: RED
....
So for each rule, there can be multiple sequences, however, there is only one RED per sequence.

How would I shape an SQL command to display all RED under the same RUL regardless of their SEQ number?
Reply With Quote
  #2  
Old 02-08-2013, 02:59 PM
Shisno Shisno is offline
Newcomer
 
Join Date: Jan 2013
Posts: 11
Default

Ok, so I've seperated the boxes instead of trying to fit them all into one box, but I'm having trouble. Instead of loading each different value, I keep getting the same value for every box.

dr.Read()
HRRRUL = dr.GetValue(0)
If HRRRUL > key1 Then
GoTo showme
End If
HRRRED = dr.GetValue(2)
myform2.txtRED3.Text = HRRRED

I'm not up for a debate on the devils of GoTo (I've seen OK examples of its use, but yes, it is usually poorly implemented).

However, how can I differentiate between SEQ.001(txtRED1.text) and SEQ.002(txtRED2.text)?
Reply With Quote
  #3  
Old 02-11-2013, 02:15 PM
Shisno Shisno is offline
Newcomer
 
Join Date: Jan 2013
Posts: 11
Default

I've played around with this a little and now I've come up with this:

dr.Read()
HRRRUL = dr.GetValue(0)
HRRRED = dr.GetValue(2)
myform2.txtRED2.Text = HRRRED
If HRRRUL > key1 Then
GoTo showme
End If


I still get the same problem, where all 7 of my boxes end up with the same RED(description) line.

ex:
box 1) Employee did not call or, show up for scheduled shift.

boxes 2-7) Employee did not call or, show up for scheduled shift.

What I cannot figure out, is whether I need a new SQL command to move to the next db line or, if this is something I can handle in VB.net. Either way, I'm hopelessly stuck for the moment.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields... Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields...
 
Displaying and Updating multiple DB fields...
Displaying and Updating multiple DB fields...
 
-->