Subject To André RE: [firebird-support] Selectable "select * fro m table" procedure
Author Miel Hostens
Dear André,

i have set up a remote database - local database + application protocol in which data is stored on the local machine with opportunity to share data on central database. Lets suppose that the central database collects all information from different veterinarian-groups. I want it to be possible to do a select on different tables in which the user passes : 1. the tables he wants to sync with his local database, 2. the time scince last sync so he receives only the information he can.

I thought about this for a long time. In MySQL there was a nice way of doing this, you pass table, user, lastsync, to selectable procedure in which the query is executed on remote database and only the needed data is returned,... The database is becoming very big so i need the best, fastest performance

So what i want in my application: You pass procedure/view/query with user,lastsync and database returns data

You get my situation?

Miel



To: firebird-support@yahoogroups.comFrom: Knappstein@...: Thu, 11 Dec 2008 11:57:24 +0100Subject: Re: [firebird-support] Selectable "select * from table" procedure



m> In mysql there is something like a selectable stored procedure, eg.m> Beginm> Select * from table xm> where x.ID = @PARAM;m> Endm> You can call this procedure via DOTNET, pass paremeters en fill a m> dataset with it easilyI don't think that in Firebird it is possible to make a stored procwith a dynamic list of output parameters.But also I cannot think of a situation where it would be really goodpractice to do so. Maybe you can describe this situation a bit; I amjust curious.I only am used to call "Select stored procedures" if the applicationlogic needs to be separated from the database logic, and that - to me- only makes sense if you need a dedicated subset of fields in thetable, probably even pre-filtered rows.In my opinion a "select * customers" written in your code is about thesame as a "select * from SP_Customers" written in your code, where theSP should run a tiny bit slower but your code is as dirty as with theraw select * from table.That said, all that works for MySQL data provider in .net should alsowork with FBProvider. Using params for queries and stored procscertainly does very well.ciao,André~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~beta Eigenheim- und Grundstücksverwertungsgesellschaft mbHHafenweg 459192 Bergkamen-RüntheTelefon: +49 2389 9240 0Telefax: +49 2389 9240 150e-mail: info@... Hamm Nr. B 420 || USt-IDNr.: DE 125215402Geschäftsführer: Achim Krähling, Dirk Salewski, Matthias Steinhaus






[Non-text portions of this message have been removed]