Skip to content
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

SQLDriverConnect does not accept values embedded in braces: DATABASE={c:\this directory} [ODBC147] #144

Closed
firebird-automations opened this issue May 31, 2012 · 5 comments

Comments

@firebird-automations
Copy link

Submitted by: Jojakim Stahl (jstahl)

Attachments:
bug-147.patch

The ODBC documentation is not clear about supporting braces {} for values with i.e. spaces. But it mentions it and uses it for the DRIVER= value. Other drivers support it - so I propose to support it also.

Commits: 610899a 4784348

@firebird-automations
Copy link
Author

Commented by: Jojakim Stahl (jstahl)

I have to propose this patch:

--- e:\http://OdbcFb.org/OdbcConnection.cpp 2012-03-01 11:33:55.000000000 +0100
+++ ./OdbcConnection.cpp 2012-05-25 09:37:26.807622600 +0200
@@ -528,10 +528,21 @@
q = value;
if (c == '=')
{
+ char term = ';';
+
while (p < end && *p == ' ') p++;

- while (p < end && (c = *p++) != ';')
+ if (*p == '{')
+ {
+ term = '}';
+ p++;
+ }
+
+ while (p < end && (c = *p++) != term)
*q++ = c;
+
+ if (term != ';')
+ while (p < end && (c = *p++) != ';');
}
*q = 0;

@firebird-automations
Copy link
Author

Commented by: Jojakim Stahl (jstahl)

uploaded patch

@firebird-automations
Copy link
Author

Modified by: Jojakim Stahl (jstahl)

Attachment: bug-147.patch [ 12611 ]

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.0.5 [ 10771 ]

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants