If want to use other dabases over the interenet
and planned to use ADO
I 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=exact2;uid=;pwd="
lConnection = CreateObject("adodb.connection")
lConnection.Open(connectionstring)
*** If i did it using odbc
** = SQLCONNECT(x,"exact2")
** = 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
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only