Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stored procedure
Message
From
07/09/2004 20:30:00
 
 
To
07/09/2004 20:17:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00940107
Message ID:
00940147
Views:
17
Hi Himlar

I think the code gets executed twice because the initialisation process trys to determine the type of the field for the resulting cursor.

I am trying to create a single remote view that will return my nextid and update it in the remote database without having to requery.

Regards
Geoff

>>Hi Hilmar
>>
>
SELECT IIF(not table='CUSTPAYMENT',999999999999,newid('CUSTPAYMENT')) as nextid ;
>>	FROM ids WHERE table='CUSTPAYMENT' INTO CURSOR tNextId
>
>
>I don't know why the SP gets executed twice.
>
>How about a two-step selection, would that solve the problem?
>
>
>SELECT (fieldlist) from ids where WHERE table='CUSTPAYMENT';
>  INTO CURSOR tNextId nofilter
>select *, IIF(not table='CUSTPAYMENT',999999999999,newid('CUSTPAYMENT')) as nextid;
>  from tNextId into cursor tNextId
>
May all your weeds be wildflowers
Previous
Reply
Map
View

Click here to load this message in the networking platform