Walter,
Could you please explain the reason to wrap the above code in the transaction? What are you trying to achive?
Thanks.
>On a second investigation:
>
>- Does not seem to occur in VFP9SP1 (at least I cannot reproduce it now)
>- It seems only to happen when I insert a record into two other (remote) tables within the same transaction (going through the same shared connection) via remote views.
>
>Walter,
>
>
>
>
>>Hi aleksey,
>>
>>We have a very consistent problem with several SYS(1104) in our project.
>>I've not been able to create reproducable case, but it went something like this:
>>
>>
>>
cString = FILETOSTR("Sqlconnect.txt")
>>nHandle = SQLSTRINGCONNECT(cString)
>>
>>BEGIN TRANSACTION
>> SQLSETPROP(nHandle,"transActions",2)
>> TEXT TO cSQL NOSHOW TEXTMERGE PRETEXT 7
>> SELECT dem_donorno, dem_pk, dem_regno
>> FROM t_demo
>> WHERE dem_firstname = 'JOE' AND UPPER(Dem_surname) = 'BLOGGS' AND
>> (dem_dob = '19440101' OR dem_dob < '19100101')
>> ENDTEXT
>> =SQLEXEC(nHandle, cSQL, '_Duplicates')
>>
>> USE IN SELECT("_Duplicates")
>>
>> =SYS(1104)
>>
>> SQLSETPROP(nHandle,"transActions",1)
>>END TRANSACTION
>>
>>Again, note that running this, won't produce the problem, but something similar in my application does.
>>
>>There must be some other circumstance under which it is occuring, but I could not identify.
>>
>>- It is occuring in both VFP8SP1 and VFP9SP1
>>- It seems to have to do with an transaction as when SYS(1104) is issued outside of the transaction, there is no problem
>>- It only generates a problem when the SQLEXEC() returns a record. If the resultset does not contain any record, there problem does not exist.
>>- VFP Select statements do not produce the same problem.
>>
>>The solution we found so far is not to use a sys(1104) within a transaction.
>>Is this a known bug ?
>>
>>Walter,
If it's not broken, fix it until it is.
My Blog