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 brentrobinson, 14 years ago

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.

comment:2 by gregboone, 14 years ago

Owner: changed from gregboone to brentrobinson

comment:3 by gregboone, 14 years ago

Milestone: 3.5.03.6.0

comment:4 by brentrobinson, 13 years ago

Severity: 32
Status: newassigned

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 brentrobinson, 13 years ago

Resolution: fixed
Status: assignedclosed

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.

Note: See TracTickets for help on using tickets.