Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with ADO
Message
 
To
30/09/1998 03:17:24
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00142253
Message ID:
00142268
Views:
32
>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

Jan,
which one is not working fine?
Pete Kane
Regards,
Peter J. Kane



Pete
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform