-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with pdo FetchField with sqlsrv #234
Comments
According to This page, the PHP type is returned in the 'native_type' field. Are you saying that the value in that field is incorrect? could you give a sample of code where the data is being returned inappropriately please. Also what version of PHP, what version of ADOdb, platform, driver etc. |
Not incorrect, but inaccurate. As you can see at the documentation: The index native_type can't tell if a type is varchar, nvarchar, char or nchar. Always come with "string". As you can see in my teste attached The output: Array Array Array But we need to know the difference between varchar and nvarchar to change the SQL to protect with N'' |
…type, see #234 1. The fetchfield method fails if a default value (-1) is sent to the method 2. SQL Server returns driver specific field information which should be used instead of the generic PDO data types 3. Field object information is cached to reduce repetitive reads of field data information
No, I'm (amazingly) ahead of schedule on this |
I'm not sure I understand what you mean by that. I see 2 sets of fixes
So IMO either the former is the fix and the milestone of this issue should be is 5.20.5, or the proper fix is the latter, in which case shouldn't cb5f1c1 not be applied in 5.20.5. Please clarify |
1. The fetchfield method fails if a default value (-1) is sent to the method 2. SQL Server returns driver specific field information which should be used instead of the generic PDO data types 3. Field object information is cached to reduce repetitive reads of field data information Fixes ADOdb#251, ADOdb#234
1. The fetchfield method fails if a default value (-1) is sent to the method 2. SQL Server returns driver specific field information which should be used instead of the generic PDO data types 3. Field object information is cached to reduce repetitive reads of field data information Fixes ADOdb#251, ADOdb#234
On method FetchField changed:
if (isset($arr['native_type']) && $arr['native_type'] <> "null") {
$o->type = $arr['native_type'];
}
else {
$o->type = adodb_pdo_type($arr['pdo_type']);
}
to:
DUe to sqlsrv the type come in the index "sqlsrv:decl_type"
The text was updated successfully, but these errors were encountered: