Opened 15 years ago
Closed 13 years ago
#548 closed defect (fixed)
SQL Spatial 'DataStore' connection property is case sensitive
Reported by: | chriserickson | Owned by: | brentrobinson |
---|---|---|---|
Priority: | major | Milestone: | 3.6.0 |
Component: | FDO API | Version: | 3.4.0 |
Severity: | 2 | Keywords: | |
Cc: | External ID: |
Description
When trying to connect to SQL Spatial 2008, I get an error:
'FdoPtr::operator->': Cannot execute function due to invalid value for the input parameter(s) 'p'.
After several hours of troubleshooting, I figured out that it is because I had the case wrong for my DataStore parameter. The database name in SQL was 'Test' and I was trying to use 'test'.
SQL Server is not case sensitive when you're using it and it should: a) allow the connection b) give some sort of description in the exception as far as which parameter it had trouble with.
Change History (5)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Owner: | changed from | to
---|
comment:3 by , 14 years ago
Milestone: | 3.5.0 → 3.6.0 |
---|
comment:4 by , 13 years ago
Severity: | 3 → 2 |
---|---|
Status: | new → assigned |
Reproducible with case-insensitive SQL Server instance. However, in FDO 3.6, we now get a segv so bumping up the severity.
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Revision: 5796 Author: brentrobinson Date: 2:42:24 PM, Friday, November 05, 2010 Message: Ticket#548: Prevent dereferencing null pointer when Schema Manager can't locate datastore.
Modified : /trunk/Providers/GenericRdbms/Src/SQLServerSpatial/Fdo/FdoRdbmsSqlServerConnection.cpp
Instead of segv, an exception is now thrown indicating that the datastore either doesn't exist or was specified in the wrong case.
A more ambitious fix would be to treat datastore name as case-insensitive and allow these types of connection to succeed. However, addressing potential side effects for case-sensitive servers could get tricky.
It is possible for SQL Server to be case-sensitive. It is case-insensitive by default but, if a case-sensitive collation is chosen when the server is installed, then it will be case-sensitive. However, there is still a defect in that the error message needs to be much more informative.