Closed nbpalomino closed 8 years ago
Concerning your pdo_dblib quoting issues, I recall having similar issues with SQL server when first using idiorm a while ago. I may have tried the solution you've proposed, but I think that created some other issues. What we ended up doing was to add this to our connection block when connecting to SQL server:
ORM::raw_execute('SET QUOTED_IDENTIFIER ON');
Hope it helps.
Quoting will not be turned off in Idiorm. You need to enable it on your server or connect request. On 17 Dec 2015 12:36, "bradrozier" notifications@github.com wrote:
Concerning your pdo_dblib quoting issues, I recall having similar issues with SQL server when first using idiorm a while ago. I may have tried the solution you've proposed, but I think that created some other issues. What we ended up doing was to add this to our connection block when connection to SQL server:
ORM::raw_execute('SET QUOTED_IDENTIFIER ON');
Hope it helps.
— Reply to this email directly or view it on GitHub https://github.com/j4mie/idiorm/issues/286#issuecomment-165318372.
Ok about Quote Character I will use _ORM::raw_execute('SET QUOTEDIDENTIFIER ON'); .
But, what about PDO::lastInsertId(); the dblib driver have a built-in solution?
When working with pdo_dblib for connect to MS SQL Server 2008,
Idiorm uses " (double quote) as quote character but this produces query errors on Red Hat Server with PHP5.2 and above mentioned SQL Server.
I fixed using none quote character. As follows:
Also I fixed a
PDO::lastInsertId()
for PDO_dblib as follows:Im preparing a Pull Request for this fixes if is valid off course.
Thanks.