473,698 Members | 2,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=Micros oft 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 5247
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=Micros oft 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.tablenam e
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******@NOyah oo.SPAMcom> wrote in message
news:OR******** *****@TK2MSFTNG P15.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=Micros oft 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.tablenam e
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
1802
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 fine if we just retrieve rows without ordering them. If we put order by clause to the query, we get the following error message: -2147467259 unspecified error. This error comes almost immediately after submitting the query.
2
1796
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 @PeriodFromDate datetime DECLARE @PeriodToDate datetime SET @WeekNumber = 27
1
3772
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 server reported the following error when attempting to create or open the web project located at the following 'URL://Localhost/WebApplication1' HTTP 1.1/500 Server error I tried reinstalling the .NET but it did not help me. Any help in this...
2
2290
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 TABLESPACE_NAME -------------------------------------------------------------------------------------------------------------------------------- SQL0443N Routine "SYSPROC.SNAPSHOT_TBS" (specific name "SNAPSHOT_TBS") has
0
1104
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 about 500+ queries, which bring back 1 piece of data as quickly as possible. I am querying the data using a method of a class. Example,
1
1092
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
1314
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 from webserver to webserver, but as soon as I try to copy my project to the Internet webserver, I get an Internal Server Error. I have FP server extensions installed on the web server and have tried every possible combination of authentication...
12
2782
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 both the iis and sql server in a single machine. Not too long ago, the machine had some hardware problems, and management has decided to purchase new servers, for both asp.net and sql server.
13
3197
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" CurrentDb().TableDefs("tblOrd").Fields("Ent").RowSource = CurrentDb().TableDefs("tblOrd").Fields("Ent").RowSource & ";" & NewData Else
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9023
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4366
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4615
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2327
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1999
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.