I am working on excel macro that extract data from database file
using SQL. I have managed to extract some data. Unfortunately it is
limited only to about 26 line of data. Any help would be much
appreciated.
Here is part of my code:
Dim qt As QueryTable
sqlstring = InputBox("Enter SQL")
connstring = "ODBC;DSN=;Database="
With ActiveSheet.QueryTables.Add(Connection:=connstring, _
Destination:=Range("A1"), Sql:=sqlstring)
.Refresh
End With
I use this in File DSN configuration:
[ODBC]
DRIVER=Microsoft dBase Driver (*.dbf)
UID=admin
UserCommitSync=Yes
Threads=3
Statistics=1
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=dBase IV
Exclusive=1
DriverId=277
Deleted=0
DefaultDir=H:\
CollatingSequence=ASCII