Page 1 of 1

Asynchronous or synchronous

PostPosted: Sat Nov 05, 2016 11:01 am
by stecenko
With sqlexec, you can set the connection to be either asynchronous or synchronous.

If you have this statement,
store sqlExec(nConnection, sqlString) to nResult
Does it matter if you are asynchronous or synchronous? Doesn't VFP hang around to receive the result?

And

if you have
sqlExec(nConnection, sqlString)
Does it matter if you are asynchronous or synchronous? Doesn't VFP keep on executing?

I'm trying to speed up a VFP application that does a kazillion inserts to msSql and am confused about synchronicity.

Re: Asynchronous or synchronous

PostPosted: Tue Apr 04, 2017 2:31 pm
by stecenko
I have a VFP table with 143,371 records.

I have a process to read each record and insert it inot an MS SQL table.

If I run the process asychronously, then it's fast (about 2 minutes). But only about 48,000 records get inserted.

If I run it sychronously, it's slower (8 minutes). But all the records are inserted.

Does any one have any idea what this is about? Am I jamming up SQL server so that it's dropping or ignoring requests to perform the insert?