Here is some of my .NET code ( i am not a VB guru either...much to learn).
The physical file has no keys, but I am trying to use a logical built over it.
The logical has a 3 part key (customer#, Invoice#, Invoice date).
I am using IBM .NET provider 6.1.
I am building a dataset.

Adapter = New iDB2DataAdapter("SELECT * FROM Duane.ARTRANL1", cni5)
Dim iDB2CB As iDB2CommandBuilder = New iDB2CommandBuilder(Adapter)
Adapter.DeleteCommand = iDB2CB.GetDeleteCommand
Adapter.InsertCommand = iDB2CB.GetInsertCommand
Adapter.UpdateCommand = iDB2CB.GetUpdateCommand

The error happens while building the Delete Command.
Here is the error:
"The table specified in the SELECT statement does not contain a unique key or identifier column, or
the SELECT statement does not include all of the key columns."

It looks like it doesn't like the keys from the logical. Is this because the physical file does not have the "Unique" keyword in the DDS? These DDS files came from the s/36 and we still have s/36 programs that use these files daily.
So, I was going to build an identifier column in the physical file. Can't because it is not an SQL created file.
Any ideas?

From: systemidotnet-request@xxxxxxxxxxxx> Subject: SystemiDotNet Digest, Vol 3, Issue 8> To: systemidotnet@xxxxxxxxxxxx> Date: Sat, 14 Feb 2009 12:00:02 -0600> > Send SystemiDotNet mailing list submissions to> systemidotnet@xxxxxxxxxxxx> > To subscribe or unsubscribe via the World Wide Web, visit> http://lists.midrange.com/mailman/listinfo/systemidotnet> or, via email, send a message with subject or body 'help' to> systemidotnet-request@xxxxxxxxxxxx> > You can reach the person managing the list at> systemidotnet-owner@xxxxxxxxxxxx> > When replying, please edit your Subject line so it is more specific> than "Re: Contents of SystemiDotNet digest..."> > > Today's Topics:> > 1. Re: System i DDS Files (Maurice O'Prey)> > > ----------------------------------------------------------------------> > message: 1> date: Fri, 13 Feb 2009 18:28:53 -0000> from: "Maurice O'Prey" <maurice.oprey@xxxxxxxxx>> subject: Re: [SystemiDotNet] System i DDS Files> > Walden is right> > Use SQL to update the required row, if it doesn't have a unqiue field/key > where a=? and b=? (which it must have if it is a relational database) then > it isn't .NET's problem.> > Avoid using the built in (easy drag and drop to databind a table to > Gridviews etc).> > Maurice> > > > ----- Original Message ----- > From: "Walden H. Leverich" <WaldenL@xxxxxxxxxxxxxxx>> To: ".net use with the System i" <systemidotnet@xxxxxxxxxxxx>> Sent: Friday, February 13, 2009 5:26 PM> Subject: Re: [SystemiDotNet] System i DDS Files> > > > 1) Use the V6R1 driver, much better.> > 2) There must be some unique key, how will you know what row to update?> > 3) Handle the updates yourself. The built in IO is nice the first few> > times, then it tends to get in the way.> >> > -Walden> >> > -- > > Walden H Leverich III> > Tech Software> > (516) 627-3800 x3051> > WaldenL@xxxxxxxxxxxxxxx> > http://www.TechSoftInc.com> >> > Quiquid latine dictum sit altum viditur.> > (Whatever is said in Latin seems profound.)> >> > -- > > This is the .net use with the System i (SystemiDotNet) mailing list> > To post a message email: SystemiDotNet@xxxxxxxxxxxx> > To subscribe, unsubscribe, or change list options,> > visit: http://lists.midrange.com/mailman/listinfo/systemidotnet> > or email: SystemiDotNet-request@xxxxxxxxxxxx> > Before posting, please take a moment to review the archives> > at http://archive.midrange.com/systemidotnet. > > > > ------------------------------> > _______________________________________________> SystemiDotNet mailing list> SystemiDotNet@xxxxxxxxxxxx> http://lists.midrange.com/mailman/listinfo/systemidotnet> > > End of SystemiDotNet Digest, Vol 3, Issue 8> *******************************************
_________________________________________________________________
All-in-one security and maintenance for your PC.  Get a free 90-day trial!
http://www.windowsonecare.com/purchase/trial.aspx?sc_cid=wl_wlmail

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.