Skip to Content.
Sympa Menu

freetds - Re: JDBC driver bug when connecting to DB that starts with number

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Irfan Baig <irfan AT abstractedge.com>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: JDBC driver bug when connecting to DB that starts with number
  • Date: Thu, 7 Jun 2001 14:55:49 -0400


interesting. obviously the person who created this db made an unfortunate
decision in naming it. but how do i make the connection call?

Connection C =
DriverManager.getConnection("jdbc:freetds:sqlserver://benitez/'4film'",

"irfan", "irfan");

SQLException: Bad database name- '4film' 0 connection are in use by this
program SQLState: null VendorError: 0

Tried some other combinations, without success.

I'd change the name, but the db is being used by an existing coldfusion app
that doesn't seem to mind the name.

> According to Date's guide to the SQL Standard:
>
> "An identifier is either a regular identifier or a delimited
> identifier.
> * A regular identifier is a string of not more than 128 characters,
> of which the first must be a letter (upper or lower case); the rest
> can be any combination of upper or lower case letters, digits, and
> the underscore character ("_"). ....
> * A delimited identifier is any string of not more than 128
> characters (not necessarily SQL language characters) enclosed in
> quotation marks. ...."
>
> So, the obvious question is, what happens when you enclose the database
> name in quotes?

--
irfan.baig = "Developer, Abstract Edge"
irfan.phone = "212.352.9311 ext 102"
irfan.fax = "212.352.9498"





Archive powered by MHonArc 2.6.24.

Top of Page