Special character ! in database name

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
hstijnen
Junior Boarder
Junior Boarder
Posts: 32
Joined: 11.04.2012, 08:49

Special character ! in database name

Post 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
hstijnen
Junior Boarder
Junior Boarder
Posts: 32
Joined: 11.04.2012, 08:49

Post by hstijnen »

The following worked:

1. connect to server without database name
2. connection->ExecuteDirect("USE [abc!def!ghi]")
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post 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
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
hstijnen
Junior Boarder
Junior Boarder
Posts: 32
Joined: 11.04.2012, 08:49

Post 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
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Henk,

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

Mark
Image
Locked