Hello Everybody
SqlConnection conn = new SqlConnection(s tr);
DataSet dataSet = new DataSet();
SqlDataAdapter dataAdap = new SqlDataAdapter( "select * from Region", conn);
conn.Open();
dataAdap.Fill(d ataSet, "Region");
I have porblem with method Fill. When i don't coment line with
dataAdap.Fill(d ataSet, "Region"); in my browser appears error:
SELECT permission denied on object 'Region', database 'Northwind', owner
'dbo'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Data.Sql Client.SqlExcep tion: SELECT permission
denied on object 'Region', database 'Northwind', owner 'dbo'.
Source Error:
Line 30:
Line 31: conn.Open();
Line 32: dataAdap.Fill(d ataSet,"Region" );
Line 33:
Line 34:
When line 32: is coment application is runnign corect:
thanks for all respond
'harry' 3 1028
In order to select information from a table in a SQL Server database, the
user referenced in your connection string must have permissions to do so.
Contact your database administrator to set up that user account with select
permissions on the table. Hope this helps.
Richard
"Pawel Blochowiak" wrote: Hello Everybody
SqlConnection conn = new SqlConnection(s tr);
DataSet dataSet = new DataSet(); SqlDataAdapter dataAdap = new SqlDataAdapter( "select * from Region", conn);
conn.Open(); dataAdap.Fill(d ataSet, "Region");
I have porblem with method Fill. When i don't coment line with dataAdap.Fill(d ataSet, "Region"); in my browser appears error:
SELECT permission denied on object 'Region', database 'Northwind', owner 'dbo'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.Sql Client.SqlExcep tion: SELECT permission denied on object 'Region', database 'Northwind', owner 'dbo'.
Source Error:
Line 30: Line 31: conn.Open(); Line 32: dataAdap.Fill(d ataSet,"Region" ); Line 33: Line 34:
When line 32: is coment application is runnign corect:
thanks for all respond 'harry'
thank you 4 your help
i thought about access to the data base, but my users haven't requirement
permissons
now is okay
by
Pawelku,
Its a security issue and adequate access to the Database.
Trzymanko
Patrick
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Homauoon Mahboobi |
last post by:
I open one SQLConnection,create a SqlDataAdapter and SqlDtaSet
and then run some queries with ExecuteNonQuery method of
SqlCommand object.When i use Fill method of DataAdapter
object,it adds all data from the source table and did not
add only changed data.For example if i call tree time Fill
method,DataSet's corresponding table contains tree record for each
one record in data source table.
Please help me to resolve this problem.
|
by: Jose |
last post by:
Hello:
I'm preparing a multitier application, and in the Data Layer I have a
EmployeeRepositoryBase class that has a protected static method called
Fill() and some GetAll() overloaded protected static methods. All GetAll()
static methods call the same Fill() in the base class.
When I want to make a new derived class EmployeeRepository from
EmployeeRepositoryBase, if I want to improve Fill() static method hiding it
with protected static...
|
by: Ryan McLean |
last post by:
Hi everyone! What is happening is the method: sub_btnSubmitClicked is
being executed every time any other object with a Handler is executed.
I am trying not to use the withevents and handles method of adding
handles to objects (I think that is where my problem lies) . . . sorry
for the long post here is my codebehind and .aspx code. Thank you for
any assistance anyone can offer!
Ryan
Public Class registration_report
|
by: Mervin Williams |
last post by:
I have several tables involved in my application, but the two in question
here are the company and address tables. The company table has
business_address_id and mailing_address_id columns, which are both foreign
keys to the address table.
So, the stored procedure to which my SelectCommand points to reads as:
ALTER PROCEDURE dbo.CompanyInfoByCompanyID
(
@companyid int
|
by: Bernie Yaeger |
last post by:
Is there any way to get into the internals of the data adapter fill method
such that I could know its progress status? For example, using the fill
method to load a 40,000 row table takes just a few seconds, but using the
fill method to load a 1.2 million row table takes more than a minute. I
would like to do the latter with a progressbar, but I first have to know the
progress of the fill method to do this - eg, what record is it up to...
| |
by: graham |
last post by:
Hi all,
<bitching and moaning section>
I am asking for any help I can get here... I am at the end of my tether... I
don;t consider myself a genius in any way whatsoever, but I do believe I
have a logical way of thinking that has served me well during my years of
application development with various tools...
But having been working with VB.NET now for close to a month... I am
beginning to doubt my abilities...
|
by: moondaddy |
last post by:
I have a website where cataloge pages are populated by calling a stored
procedure on sql server. I use the sql data adapter's fill method to call
this stored procedure and fill the dataset. about 6 to 15 times a day the
server hangs and times out when this fill method is called. The SP is
simple and uses very little resources (as tested using client statistics in
query analyzer). Here's data from my error log which includes the...
|
by: mivey4 |
last post by:
Okay,
The problem is that I have an Access Database that has the following
fields:
EmpID - Autonumber (PrimaryKey)
AccountID - Text
IssueReported - Memo
DateOpened - Date/Time
TimeOpened - Date/Time
|
by: Julien Jorge |
last post by:
Hi,
I have a compilation-time error on the specialization of a method from a imbricated template class, and I can't figure why. The problematic part of the code is resumed below. The error occurs with g++ 4.1.1 but not with g++ 4..0.3. Do you see where the error is ?
header file :
//---------------------------------------------
namespace claw
{
namespace graphic
|
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,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |