Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems WITH ADO
Message
From
29/09/1998 04:30:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Problems WITH ADO
Miscellaneous
Thread ID:
00141799
Message ID:
00141799
Views:
56
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
Map
View

Click here to load this message in the networking platform