473,382 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Asp/SQL server error when querying table

Hi, I've created a new table in a SQL Server db called 'LGBProdDetails' and
I keep getting an error from my asp page that queries the table The error
is:

Category=Microsoft OLE DB Provider for ODBC Drivers
Brief Description =[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid
object name 'LGBProdDetails'.
COM Error Number =-2147217865 (0x80040E37)

I know I have the name correct and I can query it with query analyzer using
the same query as the one in the asp pag. I'm wondering if it is a
permissions issue. When I try to look at the properties and permissions for
this table I get an error 'select permission denied on object 'syslogins',
database, 'master' owner 'dbo'. Do I need to be logged in as 'dbo' to
create a table and set permissions. The account I was logged in as when I
created the table is listed in the 'roles' diaglog box for db_owner so
shouldn't it have the same rights as the dbo? If you have any ideas I'd
really appreciate your feedback.
Aug 4 '05 #1
2 5242
Rasta wrote:
Hi, I've created a new table in a SQL Server db called
'LGBProdDetails' and I keep getting an error from my asp page that
queries the table The error is:

Category=Microsoft OLE DB Provider for ODBC Drivers
Brief Description =[Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'LGBProdDetails'.
COM Error Number =-2147217865 (0x80040E37)

I know I have the name correct and I can query it with query analyzer
using the same query as the one in the asp pag. I'm wondering if it
is a permissions issue. When I try to look at the properties and
permissions for this table I get an error 'select permission denied
on object 'syslogins', database, 'master' owner 'dbo'. Do I need to
be logged in as 'dbo' to create a table and set permissions. The
account I was logged in as when I created the table is listed in the
'roles' diaglog box for db_owner so shouldn't it have the same rights
as the dbo? If you have any ideas I'd really appreciate your
feedback.


I suspect that the table's owner is not "dbo". When the table as an owner
that is not dbo, then you have to explicitly qualify the table's name when
logged in with an account that is not the table's owner:

table's owner: login1
logged in as: login1
succeeds:
select * from tablename

logged in as: login2
fails:
select * from tablename
succeeds:
select * from login1.tablename
Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Aug 4 '05 #2
Thanks a bunch - that was it!
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OR*************@TK2MSFTNGP15.phx.gbl...
Rasta wrote:
Hi, I've created a new table in a SQL Server db called
'LGBProdDetails' and I keep getting an error from my asp page that
queries the table The error is:

Category=Microsoft OLE DB Provider for ODBC Drivers
Brief Description =[Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'LGBProdDetails'.
COM Error Number =-2147217865 (0x80040E37)

I know I have the name correct and I can query it with query analyzer
using the same query as the one in the asp pag. I'm wondering if it
is a permissions issue. When I try to look at the properties and
permissions for this table I get an error 'select permission denied
on object 'syslogins', database, 'master' owner 'dbo'. Do I need to
be logged in as 'dbo' to create a table and set permissions. The
account I was logged in as when I created the table is listed in the
'roles' diaglog box for db_owner so shouldn't it have the same rights
as the dbo? If you have any ideas I'd really appreciate your
feedback.


I suspect that the table's owner is not "dbo". When the table as an owner
that is not dbo, then you have to explicitly qualify the table's name when
logged in with an account that is not the table's owner:

table's owner: login1
logged in as: login1
succeeds:
select * from tablename

logged in as: login2
fails:
select * from tablename
succeeds:
select * from login1.tablename
Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Aug 4 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tomi Laamanen | last post by:
Hi, we have SQL Server 7.00.961 running on Windows 2000. On the client side we use ODBC driver 3.70.09.61 and an OCX component to retrieve rows from a table having about 600 000 rows. All works...
2
by: Carl Ganz | last post by:
In the code below I get an Internal SQL Server error in Query Analyzer. Ultimately I want to get thos code working in a function. DECLARE @WeekNumber tinyint DECLARE @Comp decimal(18,2) DECLARE...
1
by: Ghanashyam | last post by:
Dotnet Framework 1.1 is installed on my computer running on Windows 2000 Professional.Visual Studio >net 2003 is installed.When I try to create an ASP.NET project I get following error. The web...
2
by: aaronk321 | last post by:
Look below.. I'm baffled - what is going on? db2 => select tablespace_name from table(snapshot_tbs('epmdev01', -1)) as snapshot_tbs Do you want to execute the above command ? (y/n) y ...
0
by: Andrew Mueller | last post by:
Hello, Not sure how to give a quick explaination, but... I have an application which queries a proprietary archive. I do this using OLEDB with datasets and OLEDBDataAdapter. I am making...
1
by: unni12 | last post by:
Hi When i try to create one web application project i got internal server error. How can i overcome this. Expecting your reply Thanks UK
1
by: Dave | last post by:
Hi all, I was wondering if anyone has successfully copied a project from their local webserver to an Internet webserver via frontpage extensions. I can copy to my heart's content on a local LAN...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
13
by: smiler2505 | last post by:
Sub cmbEnt_NotInList(NewData As String, Response As Integer) Answer = MsgBox("add?", vbYesNo, "add?") If Answer = vbYes Then DoCmd.Close acForm, "frmOrd" ...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.