Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim qry, db, cs, cn, cmd, adoRec, name
- 'Query to add all the following which date more than 20 days in the table ToUnfollow
- qry = "SELECT Name FROM Follow t1 " & _
- "WHERE t1.Joined < datetime(CURRENT_DATE, '-20 days')"
- db = "C:UsersQuentinDownloadsQuentin-Classementhashtags.db"
- cs = "DRIVER=SQLite3 ODBC Driver;Database=" & db
- 'Connection to database
- Set cn = CreateObject("ADODB.Connection")
- cn.Open cs
- Set cmd = CreateObject("ADODB.Command")
- Set cmd.ActiveConnection = cn
- cmd.CommandText = qry
- SET adoRec = cmd.Execute()
- 'Iterate through the results
- While Not adoRec.EOF
- name = adoRec(0)
- MsgBox name
- adoRec.MoveNext
- Wend
- 'Close the connection
- cn.Close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement