Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
PDO dsn for Oracle with charset
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Miloslav Kmeť  
View profile  
 More options Sep 18 2008, 4:20 am
From: Miloslav Kmeť <miloslav.k...@gmail.com>
Date: Thu, 18 Sep 2008 10:20:00 +0200
Subject: PDO dsn for Oracle with charset

Hello.

I am using sfDoctrine and I need to connect to Oracle with charset defined in
PDO's dsn.

The working pdo connection identifier should look like this:
oci:host=localhost;port=1521;dbname=XE;charset=AL32UTF8

I don't know, what is the best way to get charset into the string.

I found, that there is a method Connection::setCharset, which I can't use,
because oracle hasn't any possibility to change charset after establishing a
connection.

Because I am using sfDoctrine, I do not find a way how to bypass my own PDO
instance into Doctrine_Manager.

Therefor I crate a patch for Manager.php (attachement), but I don't know, if
this is the right way how to do it.

Thank's for any proposals
--
Miloslav Kmet

  Manager.php.patch
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Wage  
View profile  
 More options Sep 18 2008, 6:15 am
From: "Jonathan Wage" <jonw...@gmail.com>
Date: Thu, 18 Sep 2008 05:15:07 -0500
Local: Thurs, Sep 18 2008 6:15 am
Subject: Re: [doctrine-user] PDO dsn for Oracle with charset

You can specify PDO style dsn to Doctrine.

Doctrine_Manager::connection(array('driver:dbname=database_name;host=localh ost',
'username', 'password'));

And in databases.yml in symfony it is.

all:
  doctrine:
    class:          sfDoctrineDatabase
    param:
      dsn:          driver:dbname=database_name;host=localhost
      username:     username
      password:     password

On Thu, Sep 18, 2008 at 3:20 AM, Miloslav Kmeť <miloslav.k...@gmail.com>wrote:

--
Jonathan H. Wage
Open Source Software Developer & Evangelist
http://www.jwage.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Miloslav Kmeť  
View profile  
 More options Sep 18 2008, 6:29 am
From: Miloslav Kmeť <miloslav.k...@gmail.com>
Date: Thu, 18 Sep 2008 12:29:13 +0200
Local: Thurs, Sep 18 2008 6:29 am
Subject: Re: [doctrine-user] Re: PDO dsn for Oracle with charset
Thank you for a quick response. It's great.

> You can specify PDO style dsn to Doctrine.

> Doctrine_Manager::connection(array('driver:dbname=database_name;host=localh
>ost', 'username', 'password'));

> And in databases.yml in symfony it is.

> all:
>   doctrine:
>     class:          sfDoctrineDatabase
>     param:
>       dsn:          driver:dbname=database_name;host=localhost
>       username:     username
>       password:     password

--
Miloslav Kmeť

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »