Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Database name with dot in it
Mon, Apr 7 2014 11:52 AMPermanent Link

Accowin

LBRP

Avatar

It is possible to create a database with the name between quotes "d.b."

When working in the database everything works OK.
When you are in an other database and want to get data from this database then the server goes to 100% and after a while you get an error that the table does not exists.

Sample:
If you current database is "d.b." and run the query SELECT * FROM "Table1" then this works
When you are in an other database and run the query SELECT * FROM "d.b."."Table1" then the server goes to 100% and after a while you get the error 'ElevateDB Error #401 The table or view  does not exist in the schema Default'

Also for table name it is possible to use . but if you query them using " then this does not work.

I thought that the " character should be used if there were strange characters in the database name or table name?
The same as in SQL server you use [ and ] around table and database names if there are strange characters in it.
Mon, Apr 7 2014 12:53 PMPermanent Link

Raul

Team Elevate Team Elevate

On 4/7/2014 11:52 AM, Accowin wrote:
> It is possible to create a database with the name between quotes "d.b."

It might be but you're definitely looking for trouble when doing this
since period is also used when including database (and schema) and
referring to the table.

EDB identifier section actually does allow it i think (confusing a bit)-
it first says no to any punctuation but then does allow periods:

http://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=Identifiers

> When you are in an other database and want to get data from this database then the server goes to 100% and after a while you get an error that the table does not exists.

Assuming it is allowed in EDB then it's a bug and you should report it
to elevate soft.


> The same as in SQL server you use [ and ] around table and database names if there are strange characters in it.

Even there even if it works it's not recommended and for some other
engines it's even prohibited so youre sql is instantly non-portable.

Raul
Thu, Apr 10 2014 3:19 AMPermanent Link

Adam Brett

Orixa Systems

Tim is so flexible he might consider re-writing EDB to allow database names with "."

However I have to say I don't think it is a very good idea (as Raul also mentions).

The "." is used as part of the basic grammar of SQL in quite a lot of contexts. Critically most computer languagae syntaxes use it to mark a join or "object 1 is linked to object 2", as in: Form.Label1.Caption:= 'Hello World';

Honestly I think you would be better to rethink your system using a simple space or some other separator, a hyphen perhaps? It will cause you less complications in the long-run.
Thu, Apr 10 2014 4:58 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

I got Tim to add () into the allowed characters, part of the argument was that since "non-valid" characters can be enclosed in quotes anything should go. However, in the case of . I can see that it may well cause problems since you will then have to differentiate between


database.table

"database.table"

"database"."table"

etc

In general I like to keep the column names such that I can have persistent fields in Delphi and the only reason I wanted () was for my homebrew report generator.


Roy Lambert

ps I am now looking for a good alternative to mmol/L Smiley
Thu, Apr 10 2014 5:57 AMPermanent Link

Accowin

LBRP

Avatar

I'm no favor of using dot either but some users of our applications have database names with dots in it Frown

I think if it is not allowed that Elevate may not allow to create database names with dots in it. It should generate an error when someone tries this.
Also the manuals says that if you use " that it should work.

So or this is a bug in the application, or the application has to refuse using dots when creating tables/databases or the manual must be changed.

I reported this as a bug so I will see what happens.
Thanks for the answers.
Image