xin chào các bạn. mình có một đoạn code ở dưới thực hiện kết nối đến csdl sql. mình muốn thêm một đoạn code kiểm tra xem kết nối có thành công không? nếu thành công thì làm tiếp....
Public cnn As New ADODB.Connection
Public rs As ADODB.recordset
Public recordset As ADODB.recordset
Const connstr = "Driver=SQL Server;SERVER=W2S1280000169\SQLEXPRESS;UID=sa;PWD=123fsdfsd456a@;DATABASE=thongke"
Public cnn As New ADODB.Connection
Public rs As ADODB.recordset
Public recordset As ADODB.recordset
Const connstr = "Driver=SQL Server;SERVER=W2S1280000169\SQLEXPRESS;UID=sa;PWD=123fsdfsd456a@;DATABASE=thongke"