Created
June 10, 2012 14:07
-
-
Save cx20/2905799 to your computer and use it in GitHub Desktop.
Hello, DAO World! (VBScript + DAO + ACE)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Call Main() | |
Sub Main() | |
Dim dbe | |
Dim db | |
Dim rs | |
Set dbe = CreateObject("DAO.DBEngine.120") | |
Set db = dbe.OpenDatabase("Hello.accdb") | |
Set rs = db.OpenRecordset("SELECT 'Hello, DAO World!' AS Message") | |
While Not rs.EOF | |
WScript.Echo rs(0).Name | |
WScript.Echo "-----------------" | |
WScript.Echo rs(0).Value | |
rs.MoveNext | |
Wend | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment