Dim
rsRecords
As
New
ADODB.Recordset
Const
adOpenKeyset = 1
Const
adLockOptimistic = 3
Const
adLockBatchOptimistic = 4
Const
adUseServer = 2
Const
adUseClient = 3
Dim
intLoop
As
Integer
cnDB.Open
"test_dsn"
rsQry =
"SELECT `table$`.F4, `table$`.F3, FORMAT(`table$`.F4, 'yyyy-mm-dd') as INSTALLDATE, `table$`.F6, `table$`.F38 FROM `table$` `table$` WHERE (`table$`.F38 LIKE '%"
& GID &
"')"
Debug.Print rsQry
rsRecords.CursorLocation = adUseClient
rsRecords.LockType = adLockOptimistic
rsRecords.CursorType = adOpenStatic
rsRecords.Fields.Append
"F4"
, adBigInt
rsRecords.Open rsQry, cnDB