just don''t know why...

  • I'm an experienced ASP programmer who is now forced to learn Cold Fusion. I've inherited this system, and I'm working off a local machine with SQL Server and Dreamweaver MX. Here's the deal.

    In Enterprise Manager I created table called, creatively, "mytable". Added two fields and some sample data. owner of table and permissions is identical to all other tables in existing database.

    My Cold Fusion code calls the first 5 rows of the data.

    When I choose a table that already exists in the database, I have no problem, but when I choose the new table (and I've tried three new tables), I get:

    Error Executing Database Query.

    [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'mytable'.

    Vender Error Code is : 208

    I've tried all sorts of starting and restarting the IIS, Application server, database everything. And this only occurs with new tables (which work fine in Enterprise manager with Query analyzer).

    Also, one more clue. I took an existing table "People" and renamed it to "Peepers" and couldn't see it either. Changed it back to "People" and it was fine.

    At the end of my rope here, any help climbing back up would be appreciated.

    M

  • Are you using something like : Select Col1 from dbo.MyTable to fetch the data (dbo. is the important part).

  • If you are sure that the owner and all permissions are the same as other tables and queries run in Query Analyzer, it sounds as though the problem is not with the tables.  Are you running the queries in QA with the same credentials as the ColdFusion code uses?

    This is a W.A.G. but given that everything works OK in EM with existing table names but not with new or renamed tables, is it possible that somewhere in the client side (ColdFusion, Java) a list of table names is maintained? 

    The key here is the People/Peepers test.  If your code can see People, not see Peepers, then see People when the name is restored it sounds as though the NAME of the table is the attribute that allows it to be seen. 

     

  • okay, now I'm red-faced. Problem has been solved. I was thinking it was a list of table names as well, but turns out it was the name of the actual database! Get this.

    I couldn't get into ColdFusion administrator due to a lost password, and I knew there were clues in there. Searches on the internet got me to reset the password, and I discovered...wait for it...that I was actually not connecting to my nice, safe local copy of my SQL database, but to a live copy on a remote web server...wow! I've been doing this for about six weeks now, with no problems, and never realized I was using a live copy of the database remotely. Ouch! Turns out there were different "types" of DSNs using the same name.

    I created a new DSN in CF Administrator to point to my local copy. It turned out that there's a huge bug with this if you're running MX with latest patches and XP Pro with SP2. I followed the forum message bread crumbs, through many "fixes", none of which worked, to a Macromedia KB article which told me how to "back door" my SQL DSN, and now it works.

    Thanks all.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply