[symfony-users] Re: How to execute a stored procedure on a remote db server throught symfony?

2009-10-02 Thread Gareth McCumskey
This article is what I read when I needed to setup and manage multiple
databases in symfony:

http://www.lampjunkie.com/2008/04/using-multiple-databases-in-symfony-with-propel/

The best bet to see how custom queries run is to look at the Propel
documentation itself on the doSelectRS statement if you use Propel 1.2 or
the doSelectStmt for Propel 1.3. Google should find you loads.

On Thu, Oct 1, 2009 at 4:10 PM, Farrukh Abbas
strategy.vs.lo...@gmail.comwrote:

 yeah thanks for the heads up ... i don't have a choice, my application has
 to interact with a third party service and the only way they provide is
 through stored procedures ... so really don't have a choice ... any pointers
 to where i can get some good read about propel custom queries? and also
 connecting to another db ... coz i have to get the data from the other db
 and put it in my db
 thanks

 On Thu, Oct 1, 2009 at 8:26 AM, Gareth McCumskey gmccums...@gmail.comwrote:

 Stored procedures, while seemingly convenient, are actually not a good
 idea if you want to ensure your application remains properly database
 abstracted/agnostic. Stored procedures are in most cases not transferable
 between database type. For example, MySQL handles stored procedures very
 differently to MSSQL and there are differences as well to PostgreSQL.

 In my development I avoid stored procedures and only use them as a last
 resort and even then as little as possible and reluctantly. Usually you can
 replicate what a stored procedure does in code and so they are not actually
 necessary.

 If you do use Propel custom queries you will probably need to look at
 using the doSelectRS (Propel 1.2) or doSelectStmt(Propel 1.3 and up) to
 accomplish it, but bear in mind the implications if you need to switch
 databases.

 On Mon, Sep 28, 2009 at 2:42 AM, dagger strategy.vs.lo...@gmail.comwrote:


 Hi,

 in my current project I have to connect to a remote system and execute
 some stored procedures then get the returned data and save it on to
 the local database... Is there a way I can achieve this through
 symfony or would I have to bank on plain php?

 Your time n help is highly appreciated... Thx




 --
 Gareth McCumskey
 http://garethmccumskey.blogspot.com
 twitter: @garethmcc





 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: How to execute a stored procedure on a remote db server throught symfony?

2009-10-01 Thread Gareth McCumskey
Stored procedures, while seemingly convenient, are actually not a good idea
if you want to ensure your application remains properly database
abstracted/agnostic. Stored procedures are in most cases not transferable
between database type. For example, MySQL handles stored procedures very
differently to MSSQL and there are differences as well to PostgreSQL.

In my development I avoid stored procedures and only use them as a last
resort and even then as little as possible and reluctantly. Usually you can
replicate what a stored procedure does in code and so they are not actually
necessary.

If you do use Propel custom queries you will probably need to look at using
the doSelectRS (Propel 1.2) or doSelectStmt(Propel 1.3 and up) to accomplish
it, but bear in mind the implications if you need to switch databases.

On Mon, Sep 28, 2009 at 2:42 AM, dagger strategy.vs.lo...@gmail.com wrote:


 Hi,

 in my current project I have to connect to a remote system and execute
 some stored procedures then get the returned data and save it on to
 the local database... Is there a way I can achieve this through
 symfony or would I have to bank on plain php?

 Your time n help is highly appreciated... Thx
 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: How to execute a stored procedure on a remote db server throught symfony?

2009-10-01 Thread Farrukh Abbas
yeah thanks for the heads up ... i don't have a choice, my application has
to interact with a third party service and the only way they provide is
through stored procedures ... so really don't have a choice ... any pointers
to where i can get some good read about propel custom queries? and also
connecting to another db ... coz i have to get the data from the other db
and put it in my db
thanks

On Thu, Oct 1, 2009 at 8:26 AM, Gareth McCumskey gmccums...@gmail.comwrote:

 Stored procedures, while seemingly convenient, are actually not a good idea
 if you want to ensure your application remains properly database
 abstracted/agnostic. Stored procedures are in most cases not transferable
 between database type. For example, MySQL handles stored procedures very
 differently to MSSQL and there are differences as well to PostgreSQL.

 In my development I avoid stored procedures and only use them as a last
 resort and even then as little as possible and reluctantly. Usually you can
 replicate what a stored procedure does in code and so they are not actually
 necessary.

 If you do use Propel custom queries you will probably need to look at using
 the doSelectRS (Propel 1.2) or doSelectStmt(Propel 1.3 and up) to accomplish
 it, but bear in mind the implications if you need to switch databases.

 On Mon, Sep 28, 2009 at 2:42 AM, dagger strategy.vs.lo...@gmail.comwrote:


 Hi,

 in my current project I have to connect to a remote system and execute
 some stored procedures then get the returned data and save it on to
 the local database... Is there a way I can achieve this through
 symfony or would I have to bank on plain php?

 Your time n help is highly appreciated... Thx




 --
 Gareth McCumskey
 http://garethmccumskey.blogspot.com
 twitter: @garethmcc

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: How to execute a stored procedure on a remote db server throught symfony?

2009-09-30 Thread dagger

any suggests?

On Sep 28, 11:22 am, Farrukh Abbas strategy.vs.lo...@gmail.com
wrote:
 I'm using propel as orm

 --
 Kind regards
 Farrukh Abbas

 On 28 Sep 2009, at 09:20, Gareth McCumskey gmccums...@gmail.com wrote:



  Are you using Propel or Doctrine as your ORM?

  On Mon, Sep 28, 2009 at 2:42 AM, dagger  
  strategy.vs.lo...@gmail.com wrote:

  Hi,

  in my current project I have to connect to a remote system and execute
  some stored procedures then get the returned data and save it on to
  the local database... Is there a way I can achieve this through
  symfony or would I have to bank on plain php?

  Your time n help is highly appreciated... Thx

  --
  Gareth McCumskey
 http://garethmccumskey.blogspot.com
  twitter: @garethmcc
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: How to execute a stored procedure on a remote db server throught symfony?

2009-09-30 Thread Richtermeister

Hey dagger,

it'll have to be a custom query to the effect of Call xyx(), but
depending on what data is returned you may still rely on regular
propel hydration.
Or some manual handling of the result set..

Just for the record, I had major issues last time I tried accessing
stored procedures via PDO. I was only able to call one procedure,
after which PDO failed to properly close the connection and wouldn't
allow me to call another procedure while the first result was still
processing.. It's a well documented bug that forced me to bypass pdo
altogether.

Daniel




On Sep 30, 3:47 am, dagger strategy.vs.lo...@gmail.com wrote:
 any suggests?

 On Sep 28, 11:22 am, Farrukh Abbas strategy.vs.lo...@gmail.com
 wrote:

  I'm using propel as orm

  --
  Kind regards
  Farrukh Abbas

  On 28 Sep 2009, at 09:20, Gareth McCumskey gmccums...@gmail.com wrote:

   Are you using Propel or Doctrine as your ORM?

   On Mon, Sep 28, 2009 at 2:42 AM, dagger  
   strategy.vs.lo...@gmail.com wrote:

   Hi,

   in my current project I have to connect to a remote system and execute
   some stored procedures then get the returned data and save it on to
   the local database... Is there a way I can achieve this through
   symfony or would I have to bank on plain php?

   Your time n help is highly appreciated... Thx

   --
   Gareth McCumskey
  http://garethmccumskey.blogspot.com
   twitter: @garethmcc
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: How to execute a stored procedure on a remote db server throught symfony?

2009-09-28 Thread Gareth McCumskey
Are you using Propel or Doctrine as your ORM?

On Mon, Sep 28, 2009 at 2:42 AM, dagger strategy.vs.lo...@gmail.com wrote:


 Hi,

 in my current project I have to connect to a remote system and execute
 some stored procedures then get the returned data and save it on to
 the local database... Is there a way I can achieve this through
 symfony or would I have to bank on plain php?

 Your time n help is highly appreciated... Thx
 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: How to execute a stored procedure on a remote db server throught symfony?

2009-09-28 Thread Farrukh Abbas
I'm using propel as orm

--
Kind regards
Farrukh Abbas

On 28 Sep 2009, at 09:20, Gareth McCumskey gmccums...@gmail.com wrote:

 Are you using Propel or Doctrine as your ORM?

 On Mon, Sep 28, 2009 at 2:42 AM, dagger  
 strategy.vs.lo...@gmail.com wrote:

 Hi,

 in my current project I have to connect to a remote system and execute
 some stored procedures then get the returned data and save it on to
 the local database... Is there a way I can achieve this through
 symfony or would I have to bank on plain php?

 Your time n help is highly appreciated... Thx




 -- 
 Gareth McCumskey
 http://garethmccumskey.blogspot.com
 twitter: @garethmcc

 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---