Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Column Data Access Database .MDB
mdb = "C:\Temp\Data files\test.mdb" tablename = "Contacts" columnname = "ID" query = StrCat("select ",columnname," from ",tablename) ; create the access application object objApp = objectopen("Access.Application") ; open the database objApp.opencurrentdatabase(mdb) ; get the current database object objCurrentdb = objApp.currentdb ; open the recordset objRecordset = objCurrentdb.openrecordset(query) ; get the fields collection objfields = objRecordset.fields ; loop through the recordset while objRecordset.eof == @false fieldcount = objfields.count For x = 0 to fieldcount-1 objfield = objfields.Item(x) message(objfield.name, objfield.value) Next objRecordset.movenext endwhile objRecordset.close objApp.closecurrentdatabase objApp.quit ; close up the objects... objectclose(objfield) objectclose(objfields) objectclose(objRecordset) objectclose(objCurrentdb) objectclose(objApp) message("", "Done") exit
Article ID: W15618
File Created: 2003:05:13:11:29:16
Last Updated: 2003:05:13:11:29:16