Major
Major

Reputation: 339

Connect to MSSQL database with period in the name, using ODBC

If I have a database named something like "foo4.3" and I attempt to connect to it using odbc it looks for a database named "foo4". The period works fine in any other string (for instance puts "foo4.3" outputs "foo4.3" so I'm a little confused as to why it is attempting to look for a database named "foo4". I've already tried the literal string version (single quotes) as well as the escape enabled string (double quotes) and attempted to escape the period but I get the same results.

Upvotes: 1

Views: 1356

Answers (1)

dgilland
dgilland

Reputation: 2748

Wrap the database name in brackets: [foo4.3]

Upvotes: 1

Related Questions