[dba-SQLServer] Odd behaviour

Francis Harvey HARVEYF1 at WESTAT.com
Fri May 14 11:02:27 CDT 2004


Martin,

The obligatory note, don't wait too long to turn it into an SP. Now
that that's out of the way... Is the owner of the table dbo or the
account that you are logging in as? Is your initial database different
from the one where your table is stored? If so, you will need to use
three part notation to specify your table.

Francis R Harvey III
WB 303, (301)294-3952
harveyf1 at westat.com


> -----Original Message-----
> From: Martin Reid [mailto:mwp.reid at qub.ac.uk] 
> Sent: Friday, May 14, 2004 11:24 AM
> To: dba-sqlserver at databaseadvisors.com
> Subject: [dba-SQLServer] Odd behaviour
> 
> 
> Working on a major revision to SQL Server
> 
> Couple of problems still remaining.
> 
> rst.Open ("Select " & argFieldName & " FROM tblDeveloperConsole")
> 
> The above line when executed returns an error "Invalid Object Name"
> 
> 'tblDeveloperConsole'
> 
> 
> The table is there. SPs work etc etc Am I doing something 
> wrong in how I am
> trying to create the statement??? I need to pass a field name 
> to the select
> at run time. Well several in fact. The var gets it value OK 
> but the SQL
> Statement appears to be correct but isnt.
> 
> This will be converted at some point to an SP.
> 
> 
> Martin
> 
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
> 



More information about the dba-SQLServer mailing list