VB datagrid绑定了adodc.修改了datagrid数据后能不能不更新.具体代码
网上搜过,不绑定可以,怎么实现.
Private Sub Command1_Click()
Dim con As ADODB.Connection
 Set con = New ADODB.Connection
con.ConnectionString = "Driver={sql server};server=Mserver;uid=sa;pwd=future?20061101;database=AIS20080319083923"
con.Open
fid = Text1.Text
Adodc1.ConnectionString = "Driver={sql server};server=Mserver;uid=sa;pwd=future?20061101;database=AIS20080319083923"
Adodc1.RecordSource = "select b.fShortNumber,b.fname,b.fmodel,a.FGMPBatchNO,unname=d.fname,a.FAuxQty from ICMO a inner join t_icitem b on b.fitemid=a.fitemid inner join t_UnitGroup c on b.funitgroupid=c.funitgroupid inner join t_measureunit d on d.funitgroupid=b.funitgroupid and d.fmeasureunitid=a.funitid  where FBillNo='" & fid & "'"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
h = con.Execute("select t_Department.Fname,t_Department.FItemID from ICMO inner join t_Department on ICMO.FWorkShop=t_Department.FItemID where FBillNo='" & fid & "'")
Label8.Caption = h(0)
End Sub