Download Vbsedit to get sample database


'Connect to and Query a Microsoft Access Database

Set objConn = CreateObject("ADODB.Connection")

Set shell = CreateObject( "WScript.Shell" )
folder=shell.ExpandEnvironmentStrings("%LOCALAPPDATA%") & "\Adersoft\Vbsedit\Resources\"

objConn.open"Provider=Microsoft.ACE.OLEDB.16.0; Data Source=" & folder & "mydatabase.accdb"

Set ors = objConn.Execute("select * from table1")

DoWhileNot(ors.EOF)
  WScript.Echo ors("field1").Value
  ors.MoveNext
Loop

ors.Close


search for scripts

VbsEdit contains all these sample scripts!





Home   Scripts

Copyright © 2001-2019 adersοft