Invalid object name Dilemma
Hello, I have multiple cf servers, one being a developer's version, the two other's are enterprise versions. I have created something like the following: cfquery name=updateUnitID datasource=#db_database# cfloop from=1 to=#listlen(form.updatedUnitIDs)# index=x cfset inputUnitID = listgetat(form.updatedUnitIDs, x) cfset inputID = listgetat(form.updatedIDs, x) cfset inputValue = form['#inputID#_#inputUnitID#'] cf_customtag email function here UPDATE tablename SET #inputID# = cfqueryparam value=#inputValue# cfsqltype=cf_sql_timestampnull=#yesnoformat(not isdate(inputValue))# WHERE unitid = cfqueryparam value=#inputUnitID# cfsqltype=cf_sql_double null=#yesnoformat(not len(inputUnitID))# ; /cfloop /cfquery Now, I know this looks strange, but the intent is to reduce the amount of loops as well as reduce the amount of cfquery tags altogether by placing a loop within a cfquery. This actually works perfectly on the cf developer's environment, and there are no extraneous characters created in the cfquery command when testing by commenting out the cfquery tags, but this does not work on the enterprise environment. The hang up is the custom tag. The custom tags on all servers are identical, and the setup of the emails are identical, given that the enterprise version has more options in the mail section of the CFIDE/Administrator. The emails send on all servers, but I get the invalid object name, which the object exists and works fine after taking out the custom tag out of the equation. Could this be a bug on the cf enterprise version? Thanks, Ryan ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303110 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Invalid object name Dilemma
Hello, I have multiple cf servers, one being a developer's version, the two other's are enterprise versions. I have created something like the following: cfquery name=updateUnitID datasource=#db_database# cfloop from=1 to=#listlen(form.updatedUnitIDs)# index=x cfset inputUnitID = listgetat(form.updatedUnitIDs, x) cfset inputID = listgetat(form.updatedIDs, x) cfset inputValue = form['#inputID#_#inputUnitID#'] cf_customtag email function here UPDATE tablename SET #inputID# = cfqueryparam value=#inputValue# cfsqltype=cf_sql_timestampnull=#yesnoformat(not isdate(inputValue))# WHERE unitid = cfqueryparam value=#inputUnitID# cfsqltype=cf_sql_double null=#yesnoformat(not len(inputUnitID))# ; /cfloop /cfquery Now, I know this looks strange, but the intent is to reduce the amount of loops as well as reduce the amount of cfquery tags altogether by placing a loop within a cfquery. This actually works perfectly on the cf developer's environment, and there are no extraneous characters created in the cfquery command when testing by commenting out the cfquery tags, but this does not work on the enterprise environment. The hang up is the custom tag. The custom tags on all servers are identical, and the setup of the emails are identical, given that the enterprise version has more options in the mail section of the CFIDE/Administrator. The emails send on all servers, but I get the invalid object name, which the object exists and works fine after taking out the custom tag out of the equation. Could this be a bug on the cf enterprise version? Thanks, Ryan ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303111 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
SQL 'Invalid Object Name' on Insert, after Create Table
Hey folks, I'm having trouble with inserting into a table I've just created. As a summary of what I'm doing: - if the table exists, delete it - create the table - read from the table to prove it's there - insert into the table *splat* : Invalid object name... I can post the full code and error if you want. All the other forum posts around the web say things like: - check the user permissions - the user in the datasource has db_owner, and for good measure db_datawriter, db_datareader. - reference the table in the INSERT with the owner (ie: dbo.tablename) - I've gone so far as to look up the owner in sysobjects - if using JDBC driver then set selectMode=cursor - done Thought it might be related to http://support.microsoft.com/kb/837970/ so I'm now running this on a different new fresh SQL server, with SP4 installed. The same error occurs on CF5 and CFMX7. Even when I try the Insert without the Create Table it fails. (ie: run once so table is created, then rem out the Create Table bit and run it again.) All suggestions welcome... ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255156 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: SQL 'Invalid Object Name' on Insert, after Create Table
Can you create a physical table and insert into it in the same batch? I'm not sure you can. Show us the code. Adrian -Original Message- From: Derek Bezuidenhout [mailto:[EMAIL PROTECTED] Sent: 03 October 2006 14:50 To: CF-Talk Subject: SQL 'Invalid Object Name' on Insert, after Create Table Hey folks, I'm having trouble with inserting into a table I've just created. As a summary of what I'm doing: - if the table exists, delete it - create the table - read from the table to prove it's there - insert into the table *splat* : Invalid object name... I can post the full code and error if you want. All the other forum posts around the web say things like: - check the user permissions - the user in the datasource has db_owner, and for good measure db_datawriter, db_datareader. - reference the table in the INSERT with the owner (ie: dbo.tablename) - I've gone so far as to look up the owner in sysobjects - if using JDBC driver then set selectMode=cursor - done Thought it might be related to http://support.microsoft.com/kb/837970/ so I'm now running this on a different new fresh SQL server, with SP4 installed. The same error occurs on CF5 and CFMX7. Even when I try the Insert without the Create Table it fails. (ie: run once so table is created, then rem out the Create Table bit and run it again.) All suggestions welcome... ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255158 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: SQL 'Invalid Object Name' on Insert, after Create Table
Don't know if it matters, but are you opening a transaction before you create the table, and trying to insert while that transaction is still open? Is this MS SQL Server? If so, is there a Go command after the table creation? Just random thoughts. ~Brad -Original Message- From: Derek Bezuidenhout [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 8:50 AM To: CF-Talk Subject: SQL 'Invalid Object Name' on Insert, after Create Table Hey folks, I'm having trouble with inserting into a table I've just created. As a summary of what I'm doing: - if the table exists, delete it - create the table - read from the table to prove it's there - insert into the table *splat* : Invalid object name... I can post the full code and error if you want. All the other forum posts around the web say things like: - check the user permissions - the user in the datasource has db_owner, and for good measure db_datawriter, db_datareader. - reference the table in the INSERT with the owner (ie: dbo.tablename) - I've gone so far as to look up the owner in sysobjects - if using JDBC driver then set selectMode=cursor - done Thought it might be related to http://support.microsoft.com/kb/837970/ so I'm now running this on a different new fresh SQL server, with SP4 installed. The same error occurs on CF5 and CFMX7. Even when I try the Insert without the Create Table it fails. (ie: run once so table is created, then rem out the Create Table bit and run it again.) All suggestions welcome... ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255159 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: SQL 'Invalid Object Name' on Insert, after Create Table
I've seen that happen on a database that was moved from one server to another where user names/passwords were different in the Enterprise Manager/CF Admin. Check those first... should be pretty easy to spot. Open the enterprise manager and view the tables in that particular database scan down the owner column and look to see if any stick out with a different name. The chances are good that your new table will have a different owner than the rest. -Original Message- From: Derek Bezuidenhout [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 9:50 AM To: CF-Talk Subject: SQL 'Invalid Object Name' on Insert, after Create Table Hey folks, I'm having trouble with inserting into a table I've just created. As a summary of what I'm doing: - if the table exists, delete it - create the table - read from the table to prove it's there - insert into the table *splat* : Invalid object name... I can post the full code and error if you want. All the other forum posts around the web say things like: - check the user permissions - the user in the datasource has db_owner, and for good measure db_datawriter, db_datareader. - reference the table in the INSERT with the owner (ie: dbo.tablename) - I've gone so far as to look up the owner in sysobjects - if using JDBC driver then set selectMode=cursor - done Thought it might be related to http://support.microsoft.com/kb/837970/ so I'm now running this on a different new fresh SQL server, with SP4 installed. The same error occurs on CF5 and CFMX7. Even when I try the Insert without the Create Table it fails. (ie: run once so table is created, then rem out the Create Table bit and run it again.) All suggestions welcome... ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255161 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: SQL ''Invalid Object Name'' on Insert, after Create Table
Thanks for the suggestions so far. I'll try them now. Here's the code: cfquery name=createTable datasource=aaa_bwdatadump IF object_id('aaa_bwdatadump..djbtest') IS NOT NULL BEGIN DROP TABLE djbtest END CREATE TABLE dbo.djbtest ( id varchar(200) ) /cfquery cfquery name=geta datasource=aaa_bwdatadump SELECT * from djbtest /cfquery cfdump var=#geta# cfquery name=getuser datasource=aaa_bwdatadump SELECT name, xtype, uid AS [owner id], USER_NAME(uid) AS owner FROM sysobjects WHERE name LIKE '%djbtest%' /cfquery cfdump var=#getUser# cfquery name=InitVals datasource=aaa_bwdatadump INSERT INTO #getuser.owner#.djbtest ('id') VALUES ('sdfasdfafasdfasfd') /cfquery - And the error: Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'dbo.djbtest'. The error occurred in D:\www\cfmx\scratch\bwconvertdata\test.cfm: line 30 28 : 29 : cfquery name=InitVals datasource=aaa_bwdatadump 30 : INSERT INTO #getuser.owner#.djbtest ('id') 31 :VALUES ('sdfasdfafasdfasfd') 32 : /cfquery SQLINSERT INTO dbo.djbtest ('id') VALUES ('sdfasdfafasdfasfd') DATASOURCE aaa_bwdatadump VENDORERRORCODE 208 SQLSTATE 42S02 --- If it makes any diff, it's on CFMX 7,0,2,137072 and MS-SQL2000 (8.00.2039 (SP4)), although I've got the same results on CF5 and MS-SQL SP3. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255164 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: SQL ''''Invalid Object Name'''' on Insert, after Create Table
It had to happen. For some reason I had 'quotes' around the col-name in the Insert. D'oh! Sorry to waste space... cfquery name=InitVals datasource=aaa_bwdatadump INSERT INTO #getuser.owner#.djbtest ('id') VALUES ('sdfasdfafasdfasfd') /cfquery ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255175 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: SQL 'Invalid Object Name' on Insert, after Create Table
When you modify the schema, are you performing this from a cfquery block? If you are, put the schema modification in a stored procedure for purposes of security, speed and abstraction. Teddy On 10/3/06, Bobby Hartsfield [EMAIL PROTECTED] wrote: I've seen that happen on a database that was moved from one server to another where user names/passwords were different in the Enterprise Manager/CF Admin. Check those first... should be pretty easy to spot. Open the enterprise manager and view the tables in that particular database scan down the owner column and look to see if any stick out with a different name. The chances are good that your new table will have a different owner than the rest. -Original Message- From: Derek Bezuidenhout [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 9:50 AM To: CF-Talk Subject: SQL 'Invalid Object Name' on Insert, after Create Table Hey folks, I'm having trouble with inserting into a table I've just created. As a summary of what I'm doing: - if the table exists, delete it - create the table - read from the table to prove it's there - insert into the table *splat* : Invalid object name... I can post the full code and error if you want. All the other forum posts around the web say things like: - check the user permissions - the user in the datasource has db_owner, and for good measure db_datawriter, db_datareader. - reference the table in the INSERT with the owner (ie: dbo.tablename) - I've gone so far as to look up the owner in sysobjects - if using JDBC driver then set selectMode=cursor - done Thought it might be related to http://support.microsoft.com/kb/837970/ so I'm now running this on a different new fresh SQL server, with SP4 installed. The same error occurs on CF5 and CFMX7. Even when I try the Insert without the Create Table it fails. (ie: run once so table is created, then rem out the Create Table bit and run it again.) All suggestions welcome... ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255180 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: SQL ''Invalid Object Name'' on Insert, after Create Table
I'd fix the query first and see if it helps ;-) INSERT INTO #getuser.owner#.djbtest ('id') VALUES ('sdfasdfafasdfasfd') You have single quotes around the column name -Original Message- From: Derek Bezuidenhout [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 10:22 AM To: CF-Talk Subject: Re: SQL ''Invalid Object Name'' on Insert, after Create Table Thanks for the suggestions so far. I'll try them now. Here's the code: cfquery name=createTable datasource=aaa_bwdatadump IF object_id('aaa_bwdatadump..djbtest') IS NOT NULL BEGIN DROP TABLE djbtest END CREATE TABLE dbo.djbtest ( id varchar(200) ) /cfquery cfquery name=geta datasource=aaa_bwdatadump SELECT * from djbtest /cfquery cfdump var=#geta# cfquery name=getuser datasource=aaa_bwdatadump SELECT name, xtype, uid AS [owner id], USER_NAME(uid) AS owner FROM sysobjects WHERE name LIKE '%djbtest%' /cfquery cfdump var=#getUser# cfquery name=InitVals datasource=aaa_bwdatadump INSERT INTO #getuser.owner#.djbtest ('id') VALUES ('sdfasdfafasdfasfd') /cfquery - And the error: Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'dbo.djbtest'. The error occurred in D:\www\cfmx\scratch\bwconvertdata\test.cfm: line 30 28 : 29 : cfquery name=InitVals datasource=aaa_bwdatadump 30 : INSERT INTO #getuser.owner#.djbtest ('id') 31 :VALUES ('sdfasdfafasdfasfd') 32 : /cfquery SQLINSERT INTO dbo.djbtest ('id') VALUES ('sdfasdfafasdfasfd') DATASOURCE aaa_bwdatadump VENDORERRORCODE 208 SQLSTATE 42S02 --- If it makes any diff, it's on CFMX 7,0,2,137072 and MS-SQL2000 (8.00.2039 (SP4)), although I've got the same results on CF5 and MS-SQL SP3. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255181 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Invalid object name
I assume SQL Server's Invalid object name error is typically a result of a missing table or mistyped table name. But I'm seeing it at a rather odd time. When I run a certain query as part of a CFC function, I receive the error Invalid object name 'dbo.tecSOLine'. But if I pull the offending query out of the CFC and run it independently, it works as expected. CF seems to know the table exists, otherwise it wouldn't work in any situation, which leaves me puzzled. Are there other common causes of invalid object name errors that any of you have run across? Thanks, paul ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236244 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Invalid object name
I assume SQL Server's Invalid object name error is typically a result of a missing table or mistyped table name. But I'm seeing it at a rather odd time. When I run a certain query as part of a CFC function, I receive the error Invalid object name 'dbo.tecSOLine'. But if I pull the offending query out of the CFC and run it independently, it works as expected. CF seems to know the table exists, otherwise it wouldn't work in any situation, which leaves me puzzled. Are there other common causes of invalid object name errors that any of you have run across? I've seen it throw that error on a view that contains reference to a deleted table, but that doesn't sound like what you're experiencing. s. isaac dealey 434.293.6201 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236262 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Invalid object name
What if the problem isnt the table name but the owner name? I've had similar issues, and replaced SELECT * from dbo.tecSOLine with SELECT * from tecSOLine IF that works where the other doesnt, then you probably need to either change your query code, or change the object owner. Look in Books Online for how to do it for your database, but in SQLServer2000 there's a SP you use as follows: exec sp_changeobjectowner 'dbo.secSQLine', 'otherlogin' Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 3/28/06, S. Isaac Dealey [EMAIL PROTECTED] wrote: I assume SQL Server's Invalid object name error is typically a result of a missing table or mistyped table name. But I'm seeing it at a rather odd time. When I run a certain query as part of a CFC function, I receive the error Invalid object name 'dbo.tecSOLine'. But if I pull the offending query out of the CFC and run it independently, it works as expected. CF seems to know the table exists, otherwise it wouldn't work in any situation, which leaves me puzzled. Are there other common causes of invalid object name errors that any of you have run across? I've seen it throw that error on a view that contains reference to a deleted table, but that doesn't sound like what you're experiencing. s. isaac dealey 434.293.6201 new epoch : isn't it time for a change? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236264 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Invalid object name
Good catch, Mike. I knew that too and either it didn't occur to me or I forgot to mention it... I think it falls into the category of things that I sort of assume have already been checked. What if the problem isnt the table name but the owner name? I've had similar issues, and replaced SELECT * from dbo.tecSOLine with SELECT * from tecSOLine IF that works where the other doesnt, then you probably need to either change your query code, or change the object owner. Look in Books Online for how to do it for your database, but in SQLServer2000 there's a SP you use as follows: exec sp_changeobjectowner 'dbo.secSQLine', 'otherlogin' Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 3/28/06, S. Isaac Dealey [EMAIL PROTECTED] wrote: I assume SQL Server's Invalid object name error is typically a result of a missing table or mistyped table name. But I'm seeing it at a rather odd time. When I run a certain query as part of a CFC function, I receive the error Invalid object name 'dbo.tecSOLine'. But if I pull the offending query out of the CFC and run it independently, it works as expected. CF seems to know the table exists, otherwise it wouldn't work in any situation, which leaves me puzzled. Are there other common causes of invalid object name errors that any of you have run across? I've seen it throw that error on a view that contains reference to a deleted table, but that doesn't sound like what you're experiencing. s. isaac dealey 434.293.6201 new epoch : isn't it time for a change? ~~ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236275 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Invalid object name
If only! The solution may well be something as simple, but unfortunately that's not it... -Original Message- From: Michael Traher [mailto:[EMAIL PROTECTED] Sent: Monday, March 27, 2006 2:05 PM To: CF-Talk Subject: Re: Invalid object name this is probably way to obvious but is the datasource the same in the cfc ... ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236279 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
MS SQL - Invalid Object Name
I some how had a duplicate table -- exactly the same name -- so I deleted one of the tables. Now I can browse the table, modify it, return rows and run queries from Enterprise Manager, but get the following error from stored procs and cfquery: [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'tabPeople'. Any ideas on how to fix this besides dropping, adding and re-filling with data? Andy Ousterhout O'My Goodness www.omygoodness.com 910 Sherwood Drive, Unit 19 Lake Bluff, IL60044 Phone 847.735.9890 Fax 847.735.9910 Yahoo IM: andy_ousterhout AOL IM: aousterhou ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184217 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: MS SQL - Invalid Object Name
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] I some how had a duplicate table -- exactly the same name -- so I deleted one of the tables. Now I can browse the table, modify it, return rows and run queries from Enterprise Manager, but get the following error from stored procs and cfquery: [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'tabPeople'. The only way to have duplicate names is to have different owners for each object; in your case the table. I imagine you deleted the other table instead of the one you wanted to. Check the owner of the remaining table, and change the owner if it incorrect. HTH, Mike ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184218 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: MS SQL - Invalid Object Name
Thanks. That was the problem! Andy -Original Message- From: Michael T. Tangorre [mailto:[EMAIL PROTECTED] Sent: Saturday, November 13, 2004 3:03 PM To: CF-Talk Subject: RE: MS SQL - Invalid Object Name From: Andy Ousterhout [mailto:[EMAIL PROTECTED] I some how had a duplicate table -- exactly the same name -- so I deleted one of the tables. Now I can browse the table, modify it, return rows and run queries from Enterprise Manager, but get the following error from stored procs and cfquery: [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'tabPeople'. The only way to have duplicate names is to have different owners for each object; in your case the table. I imagine you deleted the other table instead of the one you wanted to. Check the owner of the remaining table, and change the owner if it incorrect. HTH, Mike ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184220 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Invalid Object
-- Original Message -- From: Dave Watts [EMAIL PROTECTED] Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'securityUsers'. I think that the most common cause for this is that the database name isn't specified in the datasource, in which case the default database for the login (which is often the master database) is where the database server looks for the tables. This is amazingly similar to the problem I had over the weekend. In my case, CF wasn't regonizing tables owned by my cfuser name, but it did recognize tables owened by dbo. So, I had to find a way to change all the table owners to dbo. I couldn't find a way to do this in the documentation, so I ended up copying the tables through Export Data which created new tables with dbo as the owner. I then had to do the same sort of thing with the stored procedures. With 110+ tables (on which I had to re-set the PK and default value info) and probably 40 stored procedures, it was pretty tedious, but it worked. I'm sure there was a better way, but I couldn't find it. Scott Scott Brady http://www.scottbrady.net/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Invalid Object
sp_changeobjectowner to change the owner of a table sp_changedbowner to change the owner of a table in sql2k - Original Message - From: Scott Brady [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, February 03, 2003 11:31 AM Subject: RE: Invalid Object -- Original Message -- From: Dave Watts [EMAIL PROTECTED] Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'securityUsers'. I think that the most common cause for this is that the database name isn't specified in the datasource, in which case the default database for the login (which is often the master database) is where the database server looks for the tables. This is amazingly similar to the problem I had over the weekend. In my case, CF wasn't regonizing tables owned by my cfuser name, but it did recognize tables owened by dbo. So, I had to find a way to change all the table owners to dbo. I couldn't find a way to do this in the documentation, so I ended up copying the tables through Export Data which created new tables with dbo as the owner. I then had to do the same sort of thing with the stored procedures. With 110+ tables (on which I had to re-set the PK and default value info) and probably 40 stored procedures, it was pretty tedious, but it worked. I'm sure there was a better way, but I couldn't find it. Scott Scott Brady http://www.scottbrady.net/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Invalid Object
-- Original Message -- From: [EMAIL PROTECTED] (Bill Wheatley) sp_changeobjectowner to change the owner of a table sp_changedbowner to change the owner of a table in sql2k Thanks! I assume the first one is for Stored Procs and the second one is for tables? (or are both for tables?) That would have been very useful for the tables. I think that the stored procedure one wasn't as bad, because I got into a pretty good pattern with keyboard shortcuts on copying the original stored-proc into a new one and dropping the old one. Scott Brady http://www.scottbrady.net/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Invalid Object
This past weekend, I upgraded our server. I reinstalled ColdFusion MX, so reattached our MSSQL databases. Now when I try and perform ANY query on ANY database, I get this error: Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'securityUsers'. The datasource verifies just fine in the Administrator section, and I can use the SQL Builder tool from within Homesite+. Any idea what this error is and how to fix it? Thanks. Cedric ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Invalid Object
oi Cedric!! have you tried rebuilding those databases? A mate of mine had the same problem. He created new db's and imported all his info from the old and all worked fine. Genius I say. Critz Sunday, February 2, 2003, 10:25:23 PM, you wrote: CV This past weekend, I upgraded our server. I reinstalled ColdFusion MX, so CV reattached our MSSQL databases. Now when I try and perform ANY query on ANY CV database, I get this error: CV Error Executing Database Query. CV [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name CV 'securityUsers'. CV The datasource verifies just fine in the Administrator section, and I can CV use the SQL Builder tool from within Homesite+. Any idea what this error is CV and how to fix it? Thanks. CV Cedric CV ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Invalid Object
This past weekend, I upgraded our server. I reinstalled ColdFusion MX, so reattached our MSSQL databases. Now when I try and perform ANY query on ANY database, I get this error: Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'securityUsers'. The datasource verifies just fine in the Administrator section, and I can use the SQL Builder tool from within Homesite+. Any idea what this error is and how to fix it? Thanks. I think that the most common cause for this is that the database name isn't specified in the datasource, in which case the default database for the login (which is often the master database) is where the database server looks for the tables. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4