melnib00ne Posted November 6, 2007 Share Posted November 6, 2007 Hello,is it possible to runs an short vbscript to insert or update data into an access or mysql database ? like over odbc ?i would like to update an recordset like add a counter in the db-field each time, runs the script and insert like username or else in the database./krmelniboone Link to comment Share on other sites More sharing options...
jdoe Posted November 7, 2007 Share Posted November 7, 2007 (edited) melnib00ne,With DAO 3.6Set dao = CreateObject("DAO.DBEngine.36")Set db = dao.OpenDatabase("DATABASE.MDB")Set rst = db.OpenRecordset("TABLE")rst.AddNewrst("FIELD") = "Data"rst.Updaterst.CloseSet dao = CreateObject("DAO.DBEngine.36")Set db = dao.OpenDatabase("DATABASE.MDB")Set rst = db.OpenRecordset("SELECT FIELD1 FROM TABLE WHERE FIELD2='Criteria'")rst.Editrst("FIELD1") = "Data"rst.Updaterst.Close B) Edited November 7, 2007 by jdoe Link to comment Share on other sites More sharing options...
melnib00ne Posted November 7, 2007 Author Share Posted November 7, 2007 thank you very much. works fine./krmelnib00ne Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now