Skip to Content.
Sympa Menu

freetds - [freetds] Can't SQLConnect to db with dash

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Fedor" <fedor AT simplonic.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Can't SQLConnect to db with dash
  • Date: Mon, 27 Feb 2006 15:41:10 -0500

Hello,

I ran into a problem when trying to connect to a database with a dash (-) in
the name. If I incase the database name in single quotes it tries to connect
to it using double single quotes in the name, ie. ''test-db''.

Here's a sample error:
The database name for test purposes is test-db, connecting using isql
commandline with dsn.

[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[08004][unixODBC][FreeTDS][SQL Server]Could not locate entry in sysdatabases
for database 'test'. No entry found with that name. Make sure that the name
is entered correctly.
[][unixODBC][FreeTDS][SQL Server]Changed database context to 'test-db'.
[ISQL]ERROR: Could not SQLConnect

Config:

Driver = FreeTDS
Description = TestDSN
Trace = No
Server = 192.168.1.1
Port = 1433
Database =test-db

Looks like there's a command line function being used to connect and it uses
the dash for parameters/options and I've tried incasing the name various
ways and it's just not working. I can connect fine to databases without
dashes, and renaming is not an option at this point since there are
systems/apps already using the databases with dashes, it would be the last
resort.

Thanks.





Archive powered by MHonArc 2.6.24.

Top of Page