AnNguyen > 18-07-20, 10:08 AM
ALTER PROCEDURE [dbo].[Combo_DanhSach_CoSo]
AS
BEGIN
select tenCoSo, maCoSo from tbCoSo
END
Sub Load_DanhMucCoSo(ten_Proc As String, cbDanhMuc As ComboBox)
Dim cnn As New ADODB.Connection
cnn.ConnectionString = Chuoi_Conn
cnn.Open
Dim cmd As New ADODB.Command
Set cmd.ActiveConnection = cnn
cmd.CommandText = "dbo.Combo_DanhSach_CoSo"
cmd.CommandType = adCmdStoredProc
Set rst = New ADODB.Recordset
rst.Open cmd, , adOpenKeyset, adLockPessimistic
Set cbDanhMuc.Recordset = rst
'rst.Close ' chỗ này k dùng hay có dùng đều bị lỗi load
'cnn.Close ' nhu tren
End Sub
AnNguyen > 18-07-20, 10:18 AM
AnNguyen > 18-07-20, 10:23 AM
ongke0711 > 18-07-20, 05:49 PM
AnNguyen > 18-07-20, 06:45 PM