Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is wrong with this code?
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01654671
Message ID:
01654672
Views:
68
>Hi,
>
>I am adding records from DBF to SQL Server.
>
>If I use this syntax (below) I am limited to adding only 1000 records:
>
>cSqlInsert = cSqlInsert + "; select SCOPE_IDENTITY() AS NEW_PK "
>nResult = SQLEXEC(hCon, cSqlInsert,"cur_identity")	
>
>
>But if I remove the part that selects the SCOPE_IDENTITY, I have not limit. Why? Below the example that works:
>
>*-- Commented. cSqlInsert = cSqlInsert + "; select SCOPE_IDENTITY() AS NEW_PK "
>nResult = SQLEXEC(hCon, cSqlInsert )    && <-- removed "cur_identity"	
>
Did you try tracing with SQL Server Profiler? I see no reason for that behavior unless you had the SET ROWCOUNT somewhere in your connection that limits number of rows per operation.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform