Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this a VFP Bug
Message
From
31/07/2008 11:42:26
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01335548
Message ID:
01335555
Views:
21
This message has been marked as the solution to the initial question of the thread.
Change connecion string BackgroundFetch=No
See Re: Serious Bug in REQUERY() Message #815973 for details


>
>Kindly check this code, the records are getting duplicated.
>
>IF !DIRECTORY( 'C:\DELME')
>   MD C:\DELME
>ENDIF


>CREATE TABLE C:\DELME\X1 (F01 C(5))
>FOR lnCnt = 1 TO 10000
>   INSERT INTO X1 (F01) VALUES (SPACE(5))
>ENDFOR
>REPLACE ALL F01 WITH TRANSFORM( RECNO())
>USE IN X1
>
>lcCS = [Driver=Microsoft Visual Foxpro Driver;SourceDB=C:\DELME\;SourceType=DBF;Exclusive=No;
BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;]
>lnH = SQLSTRINGCONNECT( lcCS)
>
>LOCAL lcSQL
>lcSQL = [ SELECT F01 FROM C:\X1]
>?SQLE( lnH , lcSQL, '_cT1')
>?SQLDISCONNECT( lnH)
>
>SELECT '1', CNT(*),F01 FROM _CT1 GROUP BY 3 ORDER BY 1 DESC HAVING CNT(F01)>1 INTO CURSOR _cT1X
>BROW
>
>
>After you try this code couple of time you would realize _cT1 is having duplicated records, Any ideas why this is happening.
>This only happens when using ODBC
>
>Thanks
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform