Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE Connection settings
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
MS SQL Server
Miscellaneous
Thread ID:
01552647
Message ID:
01552673
Views:
47
Tried doing something like this with
ms1 = 1
do while ms1 = 1
  ms1 = sqlexe...
enddo
and it skips huge chunks of the file, so than instead of getting 18,000+ new rows in the DB, I get 368.

And when it hits the SQLDISCONN statement, it returns an error "Invalid call issued while executing a SQLEXEC() sequence"

Does this ring any bells with anyone?



>It's strange,
>
>ms1=0 indicate command execution (Asynchronous execution=.T.) but connection settings in picture say AE=.F.
>
>You can fix it:
>
>DO WHILE ms1=0
>  ms1 = sqlexec(mconn,"" )
>ENDDO
>
>
>MartinaJ
>
>>I've got a stored procedure in SQL that is working for every other record that I'm trying to move from VFP.
>>
>>I build my sql statement and my call to the SP is
>>
>>
>>sele MasterFile
>>** set up parameters
>>
>>m.ErrMsg = ""   && this is an OUTPUT Parameter to return any error message from the SP
>>ms1 = sqlexec(mconn, 'exec dbo.InsMaster <<Parameter List>>)
>>if !empty(m.ErrMsg)
>>  **show error in messagebox
>>endif
>>errcnt = AERROR(mErrArr)
>>if errcnt > 0
>>  ** display Aerror msg in messagebox
>>endif
>>
>>rele all like mErrArr
>>
>>
>>The first call works and ms1 = 0
>>The second call does not work and ms1 = 1
>>
>>m.ErrMsg is empty
>>AERROR does not generate anything.
>>
>>Attached is a screenshot of my connection
>>
>>Anything look out of place? Any suggestions?
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform