If want to use Btriece dabases over the interenet
and planned to use ADO
We access the databases from Visual Foxpro 5.0 / 6.0
We have setup a DSN named "TEST2"
The ODBC driver is Pervasive ODBC 32
The ODBC connection is working fine but the ADO connection gives
some problems
See Example
************************************************************
*** Example
*** Setting up Connection
connectionstring = "DSN=testt2;uid=;pwd="
lConnection = CreateObject("adodb.connection")
lConnection.Open(connectionstring)
*** If i did it using odbc
** = SQLCONNECT(x,"test2")
** = SQLEXEC(x,"Select * from debitr","Mycursor")
** This is working fine
*** Setting up RecordSet
RecordSet = CreateObject("adodb.recordset")
*** This one is working fine
lSql = "Select * from debitr"
Recordset.open(lSql,lConnection,1,2)
Recordset.movefirst
DO WHILE !RecordSet.eof
? RecordSet.fields('debnr').value
RecordSet.movenext
ENDDO
Recordset.Close
*** If i did it using odbc
** = SQLCONNECT(x,"test2")
** = SQLEXEC(x,"Select * from debitr","Mycursor")
** This is working fine
*** Setting up RecordSet
RecordSet = CreateObject("adodb.recordset")
*** This one is working fine
lSql = "Select MAX(debnr) AS debnr from debitr"
*** also tried 2,2 1,3 1,5 etc.
Recordset.open(lSql,lConnection,1,2)
Recordset.movefirst
DO WHILE !RecordSet.eof
? RecordSet.fields('debnr').value
RecordSet.movenext
ENDDO
Recordset.Close
RETURN
*** If i did it using odbc
** = SQLCONNECT(x,"exact2")
** = SQLEXEC(x,"Select MAX(debnr) as debnr from debitr","Mycursor")
** This is working fine just one record with the higest number
****************************************************************
So a standaard SQL stamement is working fine
But special SQL statement give some trouble
Ho can help me
Kind regards
Jan Dorresteijn
Email
jan@dorresteijn.nl