Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL PT problem - can't update #TempTable
Message
From
08/05/2006 09:39:26
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
08/05/2006 07:53:30
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01119994
Message ID:
01120014
Views:
17
This message has been marked as a message which has helped to the initial question of the thread.
Peter,

This is what I do. Not tested.
lcDelete = set("delete")
select test
set delete off 
scan for deleted()
lcSql = textmerge("delete yourtable for pk = <<test.pk>>")
? SQLExec(nSql,lcSql) 
endscan 
set delete &lcDelete
>John,
>
>Maybe, but I don't want to, 'cause all the users are supposed to do is delete records.
>
>So, must I?
>
>
>>Don't you need to specify the updatefieldlist?
>>
>>
>>
>>
>>>
>>>* cSql is defined as a "Select .... from SomeTable ...Join... into #TempTable"
>>>* the selection works ok, buffering is 5
>>>
>>>nSql = SQLConnect('FleetSystem')       && 1
>>>
>>>? SQLExec(nSql,cSql)                   && 1
>>>
>>>? SQLExec(nSql,[Select * From #TempTable],'Test')    && 1
>>>
>>>Delete                                 && That's all the users can do here
>>>
>>>? CursorSetProp("Tables",'#TempTable') && .T.
>>>
>>>? CursorSetProp('SendUpdates',.T.,'Sqlresult')  && .T.
>>>
>>>? CursorGetProp("Tables")              && #TempTable
>>>
>>>? TableUpdate(.t.,.t.)                 && .F.
>>>
>>>? AError(errors)                       && No update tables are specified. Use the Tables property of the cursor.
>>>
>>>
>>>TIA & BR
Previous
Reply
Map
View

Click here to load this message in the networking platform