Re: SQL - APPEND by Aron
Aron
Wed Dec 01 08:51:01 CST 2004
I created a remote view using the database designer, I could open the table I
use the APPEND FROM command to append the records and TABLEUPDATE command to
save changes however once I close the remote view the data is lost.
Thanks for your help
Aron
"Anders Altberg" wrote:
> Aron,
>
> If you create an updatable, parameterized remote view that uses an ODBC
> connection then you can
> get a an cursor data set in VFP that represents the IBM table.
> Add rows to this cursor using whatever VFP method you prefer. Then call
> TABLEUPDATE(1, .T. 'myview' ) and the data will be written to the IBM table.
> You can also use SQLPassThrough:
> h = SQLCONNECT('ibm dsn')
> USE vfptable
> SCAN
> SCATTER MEMVAR FIELDS col1, col2, col3
> ns= SQLEXEC(h, [INSERT INTO IbmTable VALUES (?col1, ?col2, ?col3) ] )
> IF ns= 1
> * ok
> ELSE
> * not so good
> ENDIF
> ENDSCAN
>
> -Anders
>
> "Aron" <Aron@discussions.microsoft.com> wrote in message
> news:46CCA546-02B4-4B25-8B56-13849415BA9D@microsoft.com...
> > How do I append using a odbc connection to a IBM iSeries database from a
> > foxpro table/cursor.
> >
> > Aron
>
>