[symfony-users] Re: symfony + doctrine + MS SQL Server

2009-05-04 Thread pcummins

Todd,

Can you post an example of the PDO/dblib DSN you are using in
database.yml?

Thanks!

-pat

On Mar 18, 6:17 pm, Todd Mcneill todd.mcne...@pmigroup.com wrote:
 Actually, I was able to resolve the issue for pdo_dblib, but not for ODBC.  
 There are two issues, both with Doctrine, not Symfony.  One is already fixed 
 in the latest Doctrine code base, but depending on how you deployed Doctrine 
 and Symfony, the fix may not be there.  There is a TRAC ticket for this fix:

 http://trac.symfony-project.org/ticket/5853

 My additional fix was to add the data type translation into the 
 doctrine/Doctrine/DataDict/Mssql.php file.  Here is my diff:

 # diff Mssql.php Mssql.php.orig
 149,151d148
              case 'bigint':
                  $type[0] = 'integer';
              break;

 The length (8 bytes) of the bigint data type is captured appropriately by the 
 Doctrine tools.

 Hope this helps.

 Todd

 -Original Message-
 From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] 
 On Behalf Of umberleigh
 Sent: Wednesday, March 18, 2009 9:41 AM
 To: symfony users
 Subject: [symfony-users] Re: symfony + doctrine + MS SQL Server

 Did you find a fix/workaround for this? I've run into the same problem

 On Mar 10, 4:32 pm, Todd McNeill todd.mcne...@pmigroup.com wrote:
  Hi -

  I'm new to Symfony and I have a small project that I wanted to start,
  but I'm having trouble building the schema using Doctrine/PDO/SQL
  Server.  I'm running Symfony 1.2.4 on RHEL 5 with Apache 2.2.3.  I'm
  using FreeTDS to communicate to my SQL Server, and I'm successfully
  connecting to the database both natively via FreeTDS and using ODBC
  (unixODBC).  A small database has already been built with a few tables
  containing test data and referential integrity.  I'm attempting to
  build the schema using the following command:

  symfony doctrine:build-schema

  While using the dblib DSN in my config/databases.yml file, I get the
  following error:

  [sfException]
  unknown database attribute type: bigint

  With the ODBC DSN, I get the following error:

  [sfException]
  SQLSTATE[24000]: Invalid cursor state: 0 [unixODBC][Driver Manager]
  Invalid cursor state (SQLFetchScroll[0] at /var/tmp/PDO_ODBC/
  odbc_stmt.c:372)

  Any insight on how I should proceed?

  Thanks,
  Todd

--~--~-~--~~~---~--~~
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: symfony + doctrine + MS SQL Server

2009-03-18 Thread umberleigh

Did you find a fix/workaround for this? I've run into the same problem

On Mar 10, 4:32 pm, Todd McNeill todd.mcne...@pmigroup.com wrote:
 Hi –

 I’m new to Symfony and I have a small project that I wanted to start,
 but I’m having trouble building the schema using Doctrine/PDO/SQL
 Server.  I’m running Symfony 1.2.4 on RHEL 5 with Apache 2.2.3.  I’m
 using FreeTDS to communicate to my SQL Server, and I’m successfully
 connecting to the database both natively via FreeTDS and using ODBC
 (unixODBC).  A small database has already been built with a few tables
 containing test data and referential integrity.  I’m attempting to
 build the schema using the following command:

 symfony doctrine:build-schema

 While using the dblib DSN in my config/databases.yml file, I get the
 following error:

 [sfException]
 unknown database attribute type: bigint

 With the ODBC DSN, I get the following error:

 [sfException]
 SQLSTATE[24000]: Invalid cursor state: 0 [unixODBC][Driver Manager]
 Invalid cursor state (SQLFetchScroll[0] at /var/tmp/PDO_ODBC/
 odbc_stmt.c:372)

 Any insight on how I should proceed?

 Thanks,
 Todd

--~--~-~--~~~---~--~~
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: symfony + doctrine + MS SQL Server

2009-03-18 Thread Todd Mcneill

Actually, I was able to resolve the issue for pdo_dblib, but not for ODBC.  
There are two issues, both with Doctrine, not Symfony.  One is already fixed in 
the latest Doctrine code base, but depending on how you deployed Doctrine and 
Symfony, the fix may not be there.  There is a TRAC ticket for this fix:

http://trac.symfony-project.org/ticket/5853

My additional fix was to add the data type translation into the 
doctrine/Doctrine/DataDict/Mssql.php file.  Here is my diff:

# diff Mssql.php Mssql.php.orig
149,151d148
 case 'bigint':
 $type[0] = 'integer';
 break;

The length (8 bytes) of the bigint data type is captured appropriately by the 
Doctrine tools.

Hope this helps.

Todd

-Original Message-
From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] On 
Behalf Of umberleigh
Sent: Wednesday, March 18, 2009 9:41 AM
To: symfony users
Subject: [symfony-users] Re: symfony + doctrine + MS SQL Server


Did you find a fix/workaround for this? I've run into the same problem

On Mar 10, 4:32 pm, Todd McNeill todd.mcne...@pmigroup.com wrote:
 Hi -

 I'm new to Symfony and I have a small project that I wanted to start,
 but I'm having trouble building the schema using Doctrine/PDO/SQL
 Server.  I'm running Symfony 1.2.4 on RHEL 5 with Apache 2.2.3.  I'm
 using FreeTDS to communicate to my SQL Server, and I'm successfully
 connecting to the database both natively via FreeTDS and using ODBC
 (unixODBC).  A small database has already been built with a few tables
 containing test data and referential integrity.  I'm attempting to
 build the schema using the following command:

 symfony doctrine:build-schema

 While using the dblib DSN in my config/databases.yml file, I get the
 following error:

 [sfException]
 unknown database attribute type: bigint

 With the ODBC DSN, I get the following error:

 [sfException]
 SQLSTATE[24000]: Invalid cursor state: 0 [unixODBC][Driver Manager]
 Invalid cursor state (SQLFetchScroll[0] at /var/tmp/PDO_ODBC/
 odbc_stmt.c:372)

 Any insight on how I should proceed?

 Thanks,
 Todd



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---