Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug? SPT and VFP 9.0 versus 8.0
Message
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Environment versions
OS:
Windows XP SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01056995
Message ID:
01057797
Views:
17
>I see this back to VFP6 with an asynchronous connection. My guess is you are doing an asynch connnection in VFP9. I have entered this as a bug.
>
>This repros:
>
>clear
>SQLDisconnect(0)
>lcconnection = "driver=SQL Server;server=(local);database=pubs"
>lnhandle = SQLSTRINGCONNECT(lcconnection)
>?lnhandle
>SQLSetProp(lnHandle,"Asynchronous",.t.)
>
>do while SQLCOLS() = 0
>enddo
>
>SQLDisconnect(lnHandle)
>
>procedure SQLCOLS()
>	nRet = SQLCOLUMNS(lnhandle, "MyTable", "NATIVE", "MyResults")
>	?nRet
>	if nRet = -1
>		AError(atest)
>		list memory like atest
>	endif
>	return nRet
>endproc
>
>
>>Hi Jim,
>>>>
>>>>Howya doin'?
>>>
>>>Great!
>>
>>Good to hear.
>>
>>>>>
>>>>>We fixed a function sequence error in VFP9 SP1 that deals with prepared views. This may or may not be related. If you could test in the VFP9 SP1 public beta, that would be great. If the problem happens there, please post code that repros the problem using SQL Server so we can get it reported.
>>>>>
>>>>>Thanks!
>>>>
>>>>Be happy to, Jim. I'll download the beta tomorrow morning.
>>>>
>>>>The best I can do, in terms of repro code, is to do this against a local instance of SQL Server. I've tried it yesterday (during a busy day) and today (first strart out). Same result.
>>>>
>>>>Do you want me to email you privately or publicly?
>>>
>>>If it is just a small code sample, post it here. If the repro is more elaborate, zip it up and email it to me.
>>>
>>>Thanks!
>>
>>Unfortunately, yesterday was kind of hectic. Got in late, left early (had to catch White Sox vs. Red Sox < vbg >) with tons to do in between. IOW, I didn't get to download the SP. I'll do it Monday.
>>
>>As for the repro code, since getting into the specifics isn't possible, here's a generalized code sequence.
lcconnection = "driver=SQL Server;server=servername;uid=userid;pwd=password;catalog=databasename"
>>lnhandle = SQLSTRINGCONNECT(lcconnection) && returns positive integer
>>* lcSQL is an SQL statement such as SELECT * FROM pubs
>>* In 8.0 SP1 returns 1 immediately
>>* In 9.0 returns 0 then returns 1 on a second call
>>? SQLEXEC(lnhandle, lcSQL, "MyResults")
>>* In 8.0 SP1 returns 1 immediately
>>* In 9.0 returns 0, then -1 on second call
>>* with the error decribed above
>>? SQLCOLUMNS(lnhandle, "MyTable", "NATIVE", "MyResults")
The above occurs with SQLCOLUMNS() regardless if I omit the call to SQLEXEC() and call SQLCOLUMNS() immediately or if I call SQLTABLES() before hand.

Jim,

I downloaded the patch. Unfortunately, no cigar here, no joy. Same error, sequence. One thing that I noted was after issuing SQLCANCEL(), SQLDISCONNECT() issued the same error.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform