Re: VB Resync

From: Chris Gamache <cgg007(at)yahoo(dot)com>
To: MRGonzalez <magotemp(at)hotmail(dot)com>, pgsql-odbc(at)postgresql(dot)org
Subject: Re: VB Resync
Date: 2003-06-12 16:01:46
Message-ID: 20030612160146.43015.qmail@web13806.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


If you're application is designed to run only with PostgreSQL, let PostgreSQL
keep track of the current value of the serial:

dataenvironment.connection.execute "Insert Into Detail (FK, Field1, Field2,
FieldN) select currval('whatever_the_PK\'s_sequence_name'),'" & intData1 &
"','" & intData2 & "','" & intDataN & "');"

HTH

--- MRGonzalez <magotemp(at)hotmail(dot)com> wrote:
> I have an application where I save the information of a bill and its detail.
> The PK of the header its a serial.
>
> I need to save the header and get the number of the serial to save it as a
> FK in the detail.
>
> This is the way I wrote but it raise an error:
>
> header.recordset.update
> header.recordset.resync adAffectCurrent, adResyncAllValues
>
> dataenvironment.connection.execute "Insert Into Detail (FK, Field1, Field2,
> FieldN) Values (" & header.recordset!PK & "," & intData1 & "," & intData2 &
> ," & intDataN & ")"
>
> Any suggestions?
>
> Thank you in advanced,
>
>
> MAGO

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

In response to

  • VB Resync at 2003-06-12 15:53:53 from MRGonzalez

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message MRGonzalez 2003-06-12 18:34:32 Re: VB Resync
Previous Message MRGonzalez 2003-06-12 15:53:53 VB Resync