帮我看看 有什么问题 谢谢了~登陆sql 有问题!(提示Refresh 有问题)
窗体1
Private Sub CmbClientType_Click()
Adodc1.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
If CmbClientType.Text = "供应商" Then
Adodc1.RecordSource = "select BusinessmanID as 客户ID,BusinessmanName as 客户名称,Country as 国家,Province as 省份,City as 城市,Address as 地址,Linkman as 联系人,Telephone as 电话,Fax as 传真 from Businessman "
Else
Adodc1.RecordSource = "select CustomerID as 客户ID,CustomerName as 客户名称,Country as 国家,Province as 省份,City as 城市,Address as 地址,Linkman as 联系人,Telephone as 电话,Fax as 传真 from Customer "
End If
Set DataGrid1.DataSource = Adodc1
Adodc1.Refresh
TxtClientID.Text = ""
TxtClient.Text = ""
TxtLinkman.Text = ""
End Sub
窗体2
Private Sub Refresh_Busi()
Adodc1.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
Adodc1.RecordSource = "select * from Business "
Set DataGrid1.DataSource = Adodc1
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
LblModify.Enabled = False
LblDelete.Enabled = False
Else
LblModify.Enabled = True
LblDelete.Enabled = True
End If
End Sub