Welcome Guest, Not a member yet? Register   Sign In
Error in mssql_driver.php 1.6.1
#1

[eluser]senojeel[/eluser]
I was just playing around with the scaffolding and had it going with CI 1.6.0. I just upgraded to 1.6.1 and now I get the error:

Code:
An Error Was Encountered
Error Number:

SELECT COUNT(*) AS "numrows" FROM "Individuals"

I tracked it down to the mssql_driver.php, the new function that was added at line 433. I don't know how to correct it, but that seems to be the problem.

Is any one else seeing that too and any ideas how to fix it?

Thanks!
Shawn
#2

[eluser]Late Night Again[/eluser]
Yes I am getting the same error

Code:
SELECT "EventID", "Title" FROM "table" ORDER BY "StartDate"

trying to find what is causing it now.
#3

[eluser]Late Night Again[/eluser]
I do not know if this is the correct fix but it has resolved my problem, here is what I have dont.

mssql_driver.php - line 461

Changed
Code:
$item = preg_replace('/(^'.$lbound.')([\w\d\-\_]+?)(\s|\)|$)/iS', '$1"$2"$3', $item);

To
Code:
$item = preg_replace('/(^'.$lbound.')([\w\d\-\_]+?)(\s|\)|$)/iS', '$1$2$3', $item);

AND

line 465

Changed
Code:
return "\"{$item}\"";

To
Code:
return "{$item}";

This may not be a correct fix but hopefully will help you out till there is a bug fix.
#4

[eluser]senojeel[/eluser]
Thanks! That seemed to work for me too. We'll see what the higher-ups say about it hopefully.
#5

[eluser]kandmcreative[/eluser]
That fixed my problems as well. This should really be rolled out in the next release!
#6

[eluser]Derek Allard[/eluser]
Sure thing. Has this been reported in the bug tracker?
#7

[eluser]senojeel[/eluser]
I just did. Thanks!
#8

[eluser]StevenW721[/eluser]
I doubt I would have caught the error on my own, thanks a lot for sharing this fix!
#9

[eluser]senojeel[/eluser]
What version of SQL Server is everyone connecting to?
#10

[eluser]Derek Jones[/eluser]
That fix just removes the quotes from the preg_replace and return values, which means that you're neutering the _protect_identifiers() method in that driver entirely. I don't have anything to test on, so are you saying that that is indeed what needs to happen? If that's the case, then just replacing that entire method's code with:

Code:
return $item;

would be the correct solution.




Theme © iAndrew 2016 - Forum software by © MyBB