# ADO 如何对一个ACCESS 档案作资料增加的动作

Posted by Max on November 17, 1998 at 16:32:15:

我想对一个 ACCESS 档做新增资料的动作,但是不要透过ADO Data Control 6.0
,小第写了一小段程式测试,但是从没成功过,请各放方高手不吝赐教.(测试环境:WIN98 & VB6.0)

Private Sub Command1_Click()
Dim rsDb As ADODB.Recordset
Set rsDb = New ADODB.Recordset
STRCNN = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security " _
& "Info=False;Data Source=C:\MDB\SL_009_1.mdb;Mode=Read|Write"
rsDb.AddNew
rsDb!SUBSIDY_CD = "A01"
rsDb!SUBSIDY_NAME = "AAAA"
rsDb!EMP_NO = "111111"
rsDb!EMP_NAME = "ASFDQE"
rsDb!SUBSIDY_AMT = "5000"
rsDb!ERROR_DESC = "SAFSA"
rsDb.Update
rsDb.Close
End Sub

Follow Ups: