The error is on VFP7 and VFP8 and VFP9 Beta ... but in vfp9 beta i receive an italian message:
"L'istruzione associata non è preparata." (sound like: the associated istruction isn't prepared)
that is not the translation of:
"Connectivity error: Unable to retrieve specific error information. Driver is probably out of resources"
Deeping on my inquiry i found that the real problem problem is "UseMemoSize".
If you try this piece of code you can see the problem!
****--------------
SQLSetProp(0, "Displogin", 1)
Private nHandle
nHandle = SQLStringConnect('Driver=Sql Server')
Visual FoxPro;WSID=WXP04;DATABASE=ADB_Demo;Trusted_Connection=Yes')
If nHandle <= 0
MessageBox('No Connection')
Return
EndIf
Local i
Local cStmt, cStmtValues
&& UserMemoSize Default is 255
&& Do Error
CURSORSETPROP("UseMemoSize", 254, 0)
&& Don't Error
** CURSORSETPROP("UseMemoSize", 255, 0)
cStmt = 'Create Table #Temp(memo varchar(254) Null)'
SQLExec(nHandle, cStmt)
SQLExec(nHandle, 'Select * From #Temp', 'Temp')
Append Blank
&& Do Error
Replace Memo With '' In Temp
cStmt = 'Insert Into #Temp(Memo) Values (?Temp.Memo)'
&& Don't Error For any UsermemoSize
&& Replace Memo With NULL In Temp
&& cStmt = 'Insert Into #Temp(Memo) Values (?Temp.Memo)'
If SQLExec(nHandle, cStmt) < 0
MessageBox(Message())
endif
USE In Temp
SQLExec(nHandle, 'Select Count(*) As Cnt From #Temp', 'Temp')
MessageBox('Records inserted : ' + Tran(Temp.Cnt))
USE In Temp
SQLDisconnect(nHandle)
bye, Emanuele!
In the beginning the Universe was created.
This has made a lot of people very angry and been widely regarded as a bad move.