cfdbinfo oddity

so I was setting up some nice app action with cfdbinfo to try and match up indexes across database servers. I came across an oddity, possibly a bug?

My predecessors named the databases and data sources with hypens in them. For example, test-database. Any database or data source (haven't singled out which causes it, I suspect the data source to be the obvious choice?) will not populate using cfdbinfo. If you use the table browsing, it will actually tell you that valid tables inside the database do not exist, rather than show you a perceived error or an inability to connect to the database.

fun stuff.

Comments
todd sharp's Gravatar Ran some tests and narrowed it down to the db name itself. Only confirmed with SQL Server Express 2005 - but a datasource name with a hyphen worked fine for SQL Server and MySQL 5. I'll try to track down the reason and see if there is a workaround.
# Posted By todd sharp | 8/30/07 10:15 PM
todd sharp's Gravatar So it looks to be an issue with SQL server itself - not cfdbinfo.

Try this:

SELECT   *   
FROM INFORMATION_SCHEMA.COLUMNS as c

Directly against a database with a hyphen in the name and you'll get nothing. Personally, I'd change the db name (if possible) :)
# Posted By todd sharp | 8/31/07 5:48 AM
Dana Kowalski's Gravatar yarg. These databases have been that way for a long time (before I started). That ones gonna hurt. Since hyphen is apparently considered a delimiter char in sql server, I wonder if cfdbinfo will take it in brackets etc. I'll have to try that later and see. I'm not sure the workload involved in changing them, but I know it will be at least enormous heh ;)

Thank you for your help Todd, invaluable as always :)
# Posted By Dana Kowalski | 8/31/07 11:36 AM
DK's Gravatar Todd,
actually when I run

SELECT *
FROM INFORMATION_SCHEMA.COLUMNS as c

on our hyphenated databases, it returns everything correctly. The plot thickens.
# Posted By DK | 8/31/07 1:02 PM
todd sharp's Gravatar What DB - SQL I'm assuming - but 2000 or 2005?
# Posted By todd sharp | 8/31/07 1:33 PM
Dana Kowalski's Gravatar sql server 2005. The databases were brought over from 2000 but have their compat. modes set to 2005.

I talked to my boss today, and he said to try the demo portion of our app and remove the hyphen there and see what happens. After that migrate the rest to remove it. Good stuff, I love fixing things to not be 'weird' :)
# Posted By Dana Kowalski | 8/31/07 2:26 PM
todd sharp's Gravatar As scary as it seems, a global find and replace should do the trick for any code references to the db name - assuming you need to. Don't forget any stored procs or views that may need to change also.
# Posted By todd sharp | 8/31/07 3:01 PM
Dana Kowalski's Gravatar I still think this is CF side. If I run the schema query inside management studio, it runs fine. It doesn't run from a cfquery though. I assume this is because of the delimiter thing, but CF doesn't let me specify delimiters anywhere in my db call. my .02 anyhow, and changing the name fixes the problems anyhow ;)
# Posted By Dana Kowalski | 8/31/07 6:41 PM
todd sharp's Gravatar You're right I believe - Sorry I created a test database with a hyphen in the name but didn't create any tables - that's why it was empty... :)

I'd file a bug on this - http://adobe.com/go/wish
# Posted By todd sharp | 8/31/07 8:09 PM
batteries's Gravatar I find the website http://www.batterylaptoppower.com laptop batteries,laptop AC adapters. All our products are brand new, with the excellent service from our laptop battery of customer service team.
the most convenient and cheap replacement battery online shop in uk. We specialize in http://www.batteryfast.com laptop batteries,laptop AC adapters. All our products are brand new, with the excellent service from our customer service team.
the most convenient and http://www.batteryfast.co.uk cheap replacement battery online shop in uk. We specialize in laptop batteries,laptop AC adapters. All of batteries are brand new, with the excellent service from our customer service team, you can feel free to purchase on laptop battery!
Here is cheap laptop ac adapter online shop in uk. We specialize in http://www.adaperlist.com laptop AC adapters. All our products are brand new, with the excellent service from our customer service team.
# Posted By batteries | 9/23/08 9:38 PM