Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL passthrough
Message
From
23/09/2002 04:15:08
 
 
To
22/09/2002 22:52:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00702210
Message ID:
00703265
Views:
17
Hi!

SQL Pass Through (SPT) cursor is a COPY of data. Whatever you change in it, you change in that COPY, and this does not affects main data. THis is similar to views. View is also a COPY of data. You can configure view to allow update data after change - main data are updated by changes in your local COPY.

With the approach I desribed you can turn your SPT cursor into updatable cursor. This will allow you to use TableUpdate() command to commit changes in your COPY of data (SPT cursor) to the main data (database).

I would recommend to read first more about views, tableupdate() command and related information in the help files. SQL Pass-Through cursors are very similar to views. It is just a bit harder to make them updatable, though they're much more flexible.

HTH.

>Hi Daniel,
>
>You got the question right.
>&& First I execute the SPT query
>csql = [Select * from acctg!items ]
>
>&& then I execute the the query
>nResult = sqlexec(vconnection,csql,'mycur')
>
>&& then I brow the created cursor
>select mycur
>browse
>
>the result for this query is okey. But after this, if i tried to change some date or insert new records in the acctg!items table using command window or native foxpro coding, then executing the same SPT commands above, the result
>does not show the record i inserted or modified.
>
>Thanks...
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform