Comment #5 Monday, July 5, 2004 3:11 AM
it doesn't seem to update? how do i do that?
mind you, i'm a noob with scripting
Felix
Comment #6 Monday, July 5, 2004 3:58 AM
Comment #7 Monday, July 5, 2004 5:52 AM
Felix
Comment #8 Tuesday, July 6, 2004 12:18 AM
Dim accessdb
Dim ConnectionString
Dim Connection
Dim strQuery
Dim RS
'Called when the script is executed
Sub Object_OnScriptEnter
Object.SetTimer 1,60000
Object_OnTimer1
End Sub
Sub Object_OnTimer1
Object.Text = ""
'### Set the location of the database
accessdb=Object.Directory & ("db1.mdb")
'### Build a dsn-less connection string
ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}"
ConnectionString=ConnectionString & "DBQ=" & accessdb
'### Create the ADO Connection object
Set Connection = CreateObject("ADODB.Connection")
Connection.Open ConnectionString
'### Create a SQL query string
strQuery = "SELECT * FROM Table1"
'### Execute the SQL query
Set RS = Connection.Execute(strQuery)
'### Maninpulate the recordset object you have just created
While Not RS.EOF
Object.Text = Object.Text & RS("Item") & ": " & RS("Value") & vbNewLine
RS.MoveNext
Wend
End Sub
'Called when the script is terminated
Sub Object_OnScriptExit
'### Clean-up
RS.Close
Connection.Close
Set RS = Nothing
Set Connection = Nothing
End Sub
Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading files.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!
Comment #1 Friday, July 2, 2004 7:58 AM