Page 1 of 1

Special character ! in database name

Posted: 17.07.2012, 11:53
by hstijnen
Hi,

I'm trying to connect to a MSSQL database with special characters ! in the name, say abc!def!ghi. Now I get error "cannot find database abc".
It seems the ! is interpreted as string separator.
When I try [abc!def!ghi] then I get the error "unclosed quotation mark after 'abc!def!' ", so one step further, but no entry.

(with another set of database components, viz. SDAC, the connection succeeds)

Any idea what to do?

Regards,
Henk

Posted: 17.07.2012, 16:23
by hstijnen
The following worked:

1. connect to server without database name
2. connection->ExecuteDirect("USE [abc!def!ghi]")

Posted: 17.07.2012, 16:23
by EgonHugeist
Hi Henk,

lol, you and your special stuff. Henk can you have a look to http://zeos.firmos.at/viewtopic.php?t=3483
is it possible that this is the same issue? If yes then we need somebody who can show us how we can find out if some object names have to be escaped or not. Thinking in if Version=??? then. Sure you know what mean..

Michael

Posted: 27.07.2012, 14:42
by hstijnen
Hi Egon,

I do indeed think it has to do with escaping. In my case i've tried "\" and doubling, but didn't work. In your case I don't know. I've no experience with stored procs in Zeos. In fact I don't use them, because they seem not able to return a result set.

kind regards

Posted: 08.10.2012, 23:03
by mdaems
Henk,

Has this issue been solved in the current beta release?
What protocol are you using? dblib, ADO or FreeTDS?

Mark