Private Sub cmdTemplate_Click() Dim Conn1 As adodb.Connection On Error GoTo VbError '''' Trap (non-ADO) error/exceptions '''' Create Connection Object (using early binding) Set Conn1 = new ADODB.Connection On Error GoTo AdoError '''' Trap any error/exception Conn1.ConnectionString = AccessConnect Conn1.Open ''''---------------------- '''' YOUR CODE GOES HERE! ''''---------------------- '''' Successful Shutdown Conn1.Close Done: '''' Miscellaneous (graceful) Cleanup On Error Resume Next Set Conn1 = Nothing Exit Sub '''' ADO Error/Exception Handler AdoError: '''' Save Error Information! ErrNumber = Err.Number ErrSource = Err.Source ErrDescription = Err.Description AdoErrorEx List1, Conn1 '''' Non-ADO Native error/exception handler VbError: VbErrorEx List1, ErrNumber, ErrSource, ErrDescription GoTo Done End Sub
List1.AddItem vbTab & "OriginalValue= " & rs1.Fields(i).OriginalValue
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18