Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT, 2 handles: how to set up updatable grid
Message
From
27/01/2005 22:17:26
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
27/01/2005 18:26:09
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00981560
Message ID:
00981593
Views:
36
Inge,

You will have to select the data into two different cursors. You can then select into a third cursor joining the data form both or you can index one of them and use "set relation". Either way, you will have to join the data together from the cursors created with the sqlexec().



>I'm using SPT (ODBC).
>I have 2 different handles since I have 2 different database in 2 different paths/locations (2 different connection strings).
>
>I have a grid with text box.
>Currently the text box shows employee ID.
>I want to show Employee name instead.
>The employee ID came from the 1st database,
>but the names are stored in the 2nd database (different location, different handle).
>
>Here's what I currently have for my SQLEXEC:
>lSuccess=SQLEXEC(THIS.lnHandle1,"SELECT empid FROM mytable1 WHERE refno='&zRefno' ","cCursor1")
>
>The grid has .RecordSourcetype=1
>.RecordSource='cCursor1'
>
>How do I code my SQLEXEC so that cCursor1 reflects Employee name (from a different handle, THIS.lHandle2)? Can that be done?
>What I want is the grid to show employee name instead of the ID.
>
>(cCursor1 is set up so that it is updatable -- used CURSORSETPROP).
>
>Thank you all.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform