On Wednesday 29 March 2006 09:03, Arí Ricardo Ody wrote:
> At 12:26 29/3/2006, you wrote:
> >Bram,
> >I think Arí is using the same ODBC connection with other programming
> > langs. So the ODBC can report the YYYY-MM-DD HH.MM.SS.UUUUUU. I just
> > didn't want you spending to much time questioning the ODBC connection.
>
> Ya! These whole story begins with a project of
> migration of a fourth tool of IBM mainframe(named
> COOL:Gen) to single cobol for MVS programs. We
> have the CA-Realia cobol installed in our local
> network and it emulates the mainframe environment.
> As I hate cobol(even being an expert) I wrote
> utilities in FPC and Lazarus. With the release
> 0.9.12 I discovered that Lazarus can access DB2
> tables via ODBC. I wrote a Lazarus program to let
> the people that are testing the converted
> programs make alterations on DB2 tables in
> user-friendly format(DBNavigator + DBGrid). When
> I try to browse the 1st table containing
> TIMESTAMP Db2 columns the show begins. I'm using
> the same ODBC driver that is used for CA-Realia
> cobol (not simultaneous, of course).
>
> >It is my understanding that the SQLdb currently does not support any PK
> > type other than numeric. So I think Update, Delete would not work with a
> > TTimeStamp. I'm not to sure how the insert would work.
>
> How I am only browsing the tables in sequential
> mode with Lazarus visual tools, there are no
> PK(primary keys envolved), I suppose. Am I wrong?
>
> [ ]
>
> Ricardo
OK I think I understand at least one of your issues. For you to be able to
'update' the SQL select statement must have a PK. The PK is used when making
an update statement (I have not tried using delete but I bet it needs a PK to
delete).
BTW I think you can program the update,delete, and insert statements in the
connection. I'm not sure about this because I haven't tried it. The
connection has the 'executedirect' procedure. So just pass the sql string
to the procedure. Of course that would mean you are not using the query
control to handle the updates etc....
John
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives