clear
*测试连接数据库 (1),由于断开了,显示的都是 相同的 nhandle
FOR i=1 TO 5
nhandle=sqlstringconnect("driver=sql server;server=173.13.99.63,1433;uid=sa;pwd=zjh123456;database=master")
* ?nhandle
if nhandle>0
?nhandle,'OK'
sqldisconnect(nhandle)
ELSE
?nhandle,'No'
ENDIF
ENDFOR
*测试连接数据库 (2),由于没断开了,显示的都是 nhandle + 1
FOR i=1 TO 5
nhandle=sqlstringconnect("driver=sql server;server=173.13.99.63,1433;uid=sa;pwd=zjh123456;database=master")
* ?nhandle
if nhandle>0
?nhandle,'OK'
ELSE
?nhandle,'No'
ENDIF
ENDFOR
*测试连接数据库 (1),由于断开了,显示的都是 相同的 nhandle
FOR i=1 TO 5
nhandle=sqlstringconnect("driver=sql server;server=173.13.99.63,1433;uid=sa;pwd=zjh123456;database=master")
* ?nhandle
if nhandle>0
?nhandle,'OK'
sqldisconnect(nhandle)
ELSE
?nhandle,'No'
ENDIF
ENDFOR
*测试连接数据库 (2),由于没断开了,显示的都是 nhandle + 1
FOR i=1 TO 5
nhandle=sqlstringconnect("driver=sql server;server=173.13.99.63,1433;uid=sa;pwd=zjh123456;database=master")
* ?nhandle
if nhandle>0
?nhandle,'OK'
ELSE
?nhandle,'No'
ENDIF
ENDFOR