我用adodc控件连接数据库,但为什么关闭窗口后数据库还是显示被独占.高手帮忙!
代码;
              Private Sub Form_Load()
Dim sql As String, mlink As String
sql = "Select * From 表1 " Where " + Form6.Combo2.Text + "like " + "'" & Form6.Text1.Text & "'"mlink = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;"
mlink = mlink + "Data Source=" + mpath + "data\区基本情况.mdb"
Adodc1.ConnectionString = mlink
Adodc1.CommandType = adCmdUnknown
If Form6.Combo4.Text <> "" And paixu = True Then
sql = sql + "Order By " + Form6.Combo4.Text + " ASC"
ElseIf Form6.Combo4.Text <> "" And paixu = False Then
sql = sql + "Order By " + Form6.Combo4.Text + " DESC"
End If
Adodc1.RecordSource = sql
Adodc1.Refresh
菜鸟求助
高手帮忙