我用ado連接資料庫成功
Adodc1.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=Paradox7;Initial Catalog=D:\我的程式\(3)"
Adodc1.RecordSource = "select * from 200712.DB"
Adodc1.Refresh
Set MSHFlexGrid1.DataSource = Adodc1
如果我想對資料庫資料操作,
Public adoCon As New ADODB.Connection
Public adors As New ADODB.Recordset
Set adoCon = New ADODB.Connection
adoCon.Open "Provider=MSDASQL.1;Persist Security Info=False;Data Source=Paradox7;Initial Catalog=D:\我的程式\(3)"
adoCon.Execute ("insert into 200712.DB values ('" & Trim(Text5) & "','" & DTPicker1.Value & "')")
卻不對,請問應該怎么改呢
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/131273.html
上一篇:關于VB添加資訊的一些問題
