Issue Details (XML | Word | Printable)

Key: ODBC-147
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Potapchenko
Reporter: Jojakim Stahl
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
ODBC Driver

SQLDriverConnect does not accept values embedded in braces: DATABASE={c:\this directory}

Created: 31/May/12 02:15 PM   Updated: 06/Sep/16 11:45 AM
Component/s: None
Affects Version/s: 2.0.1
Fix Version/s: 2.0.5

File Attachments: 1. Text File bug-147.patch (0.5 kB)

Environment: Windows 7, Firebird 2.5 x64


 Description  « Hide
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.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jojakim Stahl added a comment - 31/May/12 02:16 PM
I have to propose this patch:

--- e:\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;
 

Jojakim Stahl added a comment - 03/Nov/14 01:12 PM
uploaded patch

Jojakim Stahl made changes - 03/Nov/14 01:12 PM
Field Original Value New Value
Attachment bug-147.patch [ 12611 ]
Alexander Potapchenko made changes - 06/Jul/16 09:33 AM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s  2.0.5 [ 10771 ]
Resolution Fixed [ 1 ]
Alexander Potapchenko made changes - 06/Sep/16 11:45 AM
Status Resolved [ 5 ] Closed [ 6 ]