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

Reply via email to