Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do not use dashes (-) in an SQL database name 1

Status
Not open for further replies.

RobHVB6Sql

Programmer
May 20, 2002
77
AU
PROBLEM CAUSED:
Crystal Reports will connect to the server, connect to the database and show a list of stored procedures.
It will give a 'Syntax error or access violation' message when you attempt to use the stored procedure in a report.

SOLUTION:
Do not use a dash (-) in the naming of databases on SQL servers. Rob Hasard
Data Manager -Genetic Services
(VB6 /SQL 7.0)
 
Sorry the links mentioned in the response above do not mention any conventions or hints for SQL database names. I also found nothing on the CrystalDecisions website re this problem. Rob Hasard
Data Manager -Genetic Services
(VB6 /SQL 7.0)
 
How do pages titled "Database object naming conventions" and "SQL Server Suggested Naming Standards" NOT mention naming conventions .... ????

Actually .. the links are all different takes on naming conventions in databases in general.

Are you serious? Did you even read them?

Transcend
[gorgeous]
 
I didin't want to start an argument, just alert people to this.

An SQL database name 'Dbname-Test' is perfectly valid in SQL. The dash (-) is an explicitly allowed character. However when you attempt to use stored procedures with Crystal Reports 8.5 you will have problems. The solution is to rename it 'DBnameTest'. Rob Hasard
Data Manager -Genetic Services
(VB6 /SQL 7.0)
 
Ah ... now i'm with you

so sorry for being bitchy

have a star :)

Transcend
[gorgeous]
 
I had a client who had a table with some file information, so named their SQL table "File"

Thats a reserved word so Cr couldn't report of it at all.

I created a view "vwFile" as
Select * from [File]

and i could then get the data into a report.

How do we stop accountants from designing databases when they don't understand these rules? Editor and Publisher of Crystal Clear
 
Take away all their database design tools and force them to go through their IT section :p

I work for a government department in the IT branch and we had a big problem with users making their own access/db apps, then running into problems and getting us to support them. Next time we designed an SOE they only got access runtime :D

Transcend
[gorgeous]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top