I have a dsn on my local machine which can connect to my MS SQL Database.
When I connect to the Db in Dreamweaver it is klisting the tables as USERNAME.TableName
When I try and query using this syntax eg
SELECT * FROM USERNAME.TableName
, it errors as a Invalid Object name.
When I query using just the table name, it also errors saying the object doesnt exist.
Also tried SELECT * FROM USERNAME.TableName AS VARTableName
Could someone point me in the right direction with this. PS I have also tried with a dsn-less connection, to same result,
Thanks
[QUOTE=BodybrilliantMike]
All is now fine. Not sure why:-\
Thanks
I have a dsn on my local machine which can connect to my MS SQL Database.
When I connect to the Db in Dreamweaver it is klisting the tables as USERNAME.TableName
When I try and query using this syntax eg
SELECT * FROM USERNAME.TableName
, it errors as a Invalid Object name.
When I query using just the table name, it also errors saying the object doesnt exist.
Also tried SELECT * FROM USERNAME.TableName AS VARTableName
Could someone point me in the right direction with this. PS I have also tried with a dsn-less connection, to same result,
Thanks
[/QUOTE]
In your DSN configuration, check if the option “Change the default database to:” is set to the database that you wish to query.