HP3000-L Archives

June 1997, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Joe Geiser <[log in to unmask]>
Reply To:
Date:
Wed, 25 Jun 1997 18:09:01 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (99 lines)
On Wednesday, June 25, 1997 5:54 AM, Bob Walker
[SMTP:[log in to unmask]] wrote:
>
> > From:          Joe Geiser <[log in to unmask]>
>
> > Subject:       Re: Was (Update on IMAGE/SQL Database)
>
> > On Wednesday, June 25, 1997 11:26 AM, Friedrich Harasleben
> > [SMTP:[log in to unmask]] wrote:
>
> > > for those of you how might be interested. Sometimes ago there
> > > was a mail
> > > on this list by Herbert Baumgartner, how wanted to know if
> > > somebody has
> > > done successful updates on an IMAGE/SQL database from EXCEL.
> > > Yes, it works. Altough it is not very fast it does what one
> > > expects it to
> > > do (even with the standard HP ODBC driver).
>
> [Joe...]
> > No matter where the data source comes from (an Excel spreadsheet,
> > a
> > Visual "x" program - "x" can be "Basic", "C++", etc. etc. etc...)
> > -
> > the one key to updating an Image/SQL dataset is a Unique, Primary
> > Key.
> >
> > The Unique Primary Key ensures that one and only one row can be
> > retrieved for subsequent update, or a unique key exists for a new
> > entry to the datasets.  For multi-row updates or inserts,
> > especially
> > if a CURSOR is used, again, it ensures that one row in the cursor
> > can
> > be discerned from others.  BULK UPDATEs and BULK INSERTs rely on
> > this
> > primary key as well.
> >
> > The Unique Primary Key is absolutely essential if using Linked
> > Tables
> > within MS Access or MS Excel - updates will not work correctly
> > without it and in most case, will produce a runtime error.
> >
> > Lastly - even if a Unique Primary Key is used - the use of PCAPI
> > for
> > the ODBC driver for updates can be iffy.  PCAPI is good at
> > reading
> > the data and writing new entries, but for updates, again, you
have
> > a
> > better chance of success if the Unique Primary Key is defined
> > (and
> > declared) in the database.
>
> Good description by Joe, but I must disagree with the last
> paragraph.
> I know the world is sitll 'Visual - x' centric, so I should mention
>
> that we have been successfully using PowerBuilder for the last 2
> years to insert and update into Image Databases with very few
> problems and have not implemented a Unique Primary Key on our
detail
>
> sets.  Of course, PowerBuilder does not have the Unique Key
> contraints imposed by the Jet Database Engine used by Excel.
>
> Updates and deletes are done including all the fields of the
dataset
>
> in the select part of the update or delete SQL statement(This is
> recommended by Powerbuilder for all server databases).
>
> The only time we run into problems is when there are two
> entries in a detail set that are *exactly* the same. This should
> never happen anyways, and is a flag to us to fix something.
>

Bob,

True, Powerbuilder dosen't need the Unique Key --- but I always
ensure one is there for the exact reason you state.  It shouldn't be
there, but the possibility exists that it will and you have to be
able to handle it.  You never know, someone just may WANT to have
this condition...

Oh well...back to making dinner...

Cheers,
Joe

---------------------------------------------------------------------
Joe Geiser
CSI Business Solutions
140 Bristol-Oxford Valley Road
Suite 102
Langhorne, PA 19047-3083, USA
Phone: +1 (215) 945-8100/Fax: +1 (215) 943-8408
E-Mail:  [log in to unmask]    WWW: http://www.csillc.com
---------------------------------------------------------------------

ATOM RSS1 RSS2