> >*** Connection Strings to Access DB via ODBC >***# Standard Security: >**** "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=;" >*** # Workgroup: >**** "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;SystemDB=C:\mydatabase.mdw;" >*** # Exclusive: >**** "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Exclusive=1;Uid=admin;Pwd=" > > >DEFINE CLASS MyCA AS CursorAdapter > >PROCEDURE Init >local llReturn >do case > case not pemstatus(This, '__VFPSetup', 5) > This.AddProperty('__VFPSetup', 0) > case This.__VFPSetup = 2 > This.__VFPSetup = 0 > return >ENDCASE >this.Alias = "WhatCursorAliasYouWant" >this.Tables = "ListRemoteTablesYouUse" >this.WhereType = 1 &&Check CA.WhereType in Help >this.BreakOnError = .t. >this.BufferModeOverride = 5 && Cursor Buffering type >llReturn = dodefault() >*** Select connection code: DO NOT REMOVE >local lcDBC >set multilocks on > >this.DataSourceType = "ODBC" >this.DataSource = SQLSTRINGCONNECT("Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Exclusive=1;Uid=admin;Pwd=") && See the strings above > > >*** End of Select connection code: DO NOT REMOVE >*** Setup code: DO NOT REMOVE >***<SelectCmd> >This.SelectCmd = "select ListRemoteTablesYouUse.[field list here, I don't use *] FROM ListRemoteTablesYouUse "+; > "WHERE whereClauseIfYouWant" > >***</SelectCmd> >***<KeyFieldList> >This.KeyFieldList = "KeyFieldList" >***</KeyFieldList> > >***<UpdateNameList> >This.UpdateNameList = "FieldFromCursor ListRemoteTablesYouUse.Field, ...." >***</UpdateNameList> > > > >***<UpdatableFieldList> >This.UpdatableFieldList = "WhichFieldsYouWantToBeUpdated" >***</UpdatableFieldList> > >*** End of Setup code: DO NOT REMOVE >if This.__VFPSetup = 1 > This.__VFPSetup = 2 >endif >return llReturn > > >PROCEDURE AutoOpen >*** Setup code: DO NOT REMOVE >if not pemstatus(This, '__VFPSetup', 5) > This.AddProperty('__VFPSetup', 1) > This.Init() >endif >*** End of Setup code: DO NOT REMOVE >ENDPROC > >ENDDEFINE >