Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simulating Next and Previous in Oracle
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00187155
Message ID:
00187245
Vues:
16
Josh,

Thanks for your reply.

I agree with your 1st sentence, however, it seems as this seems to be a reasonable request. Especially when navigating by the primary key. Even if I narrow the select statement to retrieve a sub-set of rows, I still will only want 1 row returned. Since this application will be run over a WAN, the lower the traffic, the better. Returning 1 row from a sub-set of rows will still yield better performance. Requires a bit more programming, I can handle that.

The error I receive is as follows:

1526
Connectivity error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-01009: missing mandatory parameter.
S1000
1009

If the error was consistent, I would think it was syntax by the error message. It works sometimes.

Thanks,

Greg

>Gregory,
>
>Your users may have to get used to the idea of selecting a sub-set of records then navigating within that sub-set. That's usually how client/server applications work.
>
>While you can set a query to return only 1 record, the entire query will still be executed. That means that moving from the 1st record to the 2nd record of a 100,000 record table will result in the server performing a query that returns 99,999 rows. The server will only return 1 row to the front end but you're still generating a lot of activity on the server. If you have several users using the application at once you're likely to run into performance problems.
>
>That said, what error does the server return? This might be a configuration issue on the server or a syntax problem with your query.
>
>
>>I have an application that is currently using VFP tables. I am in the process of porting this application to use Oracle on the backend. The current application allows navigating through the data on as many as 12 different orders by selecting top, next, previous and last. The users would like to retain this functionality when the data is moved into oracle.
>>
>>I am presently using SQL pass through due to the large number of orders that are possible. The following code works for small tables all the time but on the primary table that is approx. 100,000 rows returns an error sometimes. Is there a better way to provide this functionality?
>>
>>*----- Example retrieves next row
>>*----- Previous is the same except uses < and DESC
>>*----- Top and Last does not use value, Last uses DESC
>>
>>CURSORSETPROP('MaxRecords',1,0) && Set the number of rows to
>> && return to 1
>>
>>cTable=THIS.sql_table
>>cOrder=THIS.sql_order
>>cCursor=THIS.sql_cursor
>>cValue=THIS.sql_parse(THIS.sql_order)
>>nHandle=THIS.sql_handle
>>
>>sql_trans=[SELECT * FROM ]+cTable+ ;
>> [ WHERE ]+cOrder+[ > ]+cValue+ ;
>> [ ORDER BY ]+cOrder+[ ASC]
>>
>>SQLPREPARE(nHandle,sql_trans,cCursor)
>>SQLEXEC(nHandle)
>>
>>CURSORSETPROP('MaxRecords',-1,0) && Set the number of rows to
>> && return to unlimited
>>
>>Thanks,
>>
>>Greg
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform