473,385 Members | 1,872 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,385 software developers and data experts.

SQL Exception

Hello,
I'm learning .NET. Within my C# application I am
attempting to establish a connection to my
SQLServer 2000 database using the OleDbConnection
type of ADO.NET.

Both the database and application are running on the
same machine. The SQL Server is configured to perform
'Windows Only' authentication. However when I attempt
to connect as one of the Windows users I get the
following exception:

Exception: Login failed for user 'xyz'.
Reason: Not associated with a trusted SQL Server
connection.

I'd greatly appreciate your help.

Thanks!

Jul 21 '05 #1
3 2443
Does XYZ have an account with permissions on the server?
"Ulysses" <uh*******@bellsouth.net> wrote in message
news:2a*****************************@phx.gbl...
Hello,
I'm learning .NET. Within my C# application I am
attempting to establish a connection to my
SQLServer 2000 database using the OleDbConnection
type of ADO.NET.

Both the database and application are running on the
same machine. The SQL Server is configured to perform
'Windows Only' authentication. However when I attempt
to connect as one of the Windows users I get the
following exception:

Exception: Login failed for user 'xyz'.
Reason: Not associated with a trusted SQL Server
connection.

I'd greatly appreciate your help.

Thanks!

Jul 21 '05 #2
Thanks for the follow-up.

Yes I do have XYZ as a registered user on the SQL Server.

-----Original Message-----
Does XYZ have an account with permissions on the server?
"Ulysses" <uh*******@bellsouth.net> wrote in message
news:2a*****************************@phx.gbl...
Hello,
I'm learning .NET. Within my C# application I am
attempting to establish a connection to my
SQLServer 2000 database using the OleDbConnection
type of ADO.NET.

Both the database and application are running on the
same machine. The SQL Server is configured to perform
'Windows Only' authentication. However when I attempt
to connect as one of the Windows users I get the
following exception:

Exception: Login failed for user 'xyz'.
Reason: Not associated with a trusted SQL Server
connection.

I'd greatly appreciate your help.

Thanks!

.

Jul 21 '05 #3
Is your connection string specifiying SSPI= TRUE or are you poassing in XYZ
and the password?
"Ulysses" <uh*******@bellsouth.net> wrote in message
news:2a*****************************@phx.gbl...
Hello,
I'm learning .NET. Within my C# application I am
attempting to establish a connection to my
SQLServer 2000 database using the OleDbConnection
type of ADO.NET.

Both the database and application are running on the
same machine. The SQL Server is configured to perform
'Windows Only' authentication. However when I attempt
to connect as one of the Windows users I get the
following exception:

Exception: Login failed for user 'xyz'.
Reason: Not associated with a trusted SQL Server
connection.

I'd greatly appreciate your help.

Thanks!

Jul 21 '05 #4

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

Similar topics

4
by: Nicolas Fleury | last post by:
Hi, I've made a small utility to re-raise an exception with the same stack as before with additional information in it. Since I want to keep the same exception type and that some types have very...
1
by: Old Wolf | last post by:
1. What is the difference between #include <stdexcept> and #include <exception> ? 2. Is there a list somewhere of what each standard exception is used for? either to throw them, or throw...
11
by: Master of C++ | last post by:
Hi, I am writing a simulation package in C++, and so far I've written about 8000 lines of code and have about 30 classes. I haven't used C++ exceptions so far (for various reasons). The only two...
4
by: maricel | last post by:
I have the following base table structure - DDL: CREATE TABLE "ADMINISTRATOR"."T1" ( "C1" INTEGER NOT NULL ) IN "TEST_TS" ; ALTER TABLE "ADMINISTRATOR"."T1" ADD PRIMARY KEY
44
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level...
40
by: Kevin Yu | last post by:
is it a bad programming design to throw exception in the try block then catch it??
6
by: Vadivel Kumar | last post by:
I've a problem in handling a custom exception The following is my custom exception class: public class AppException : public Exception { public AppException (string message, Exception...
3
by: JohnDeHope3 | last post by:
First let me say that I understand that Asp.Net wraps my exception in an HttpUnhandledException. I have found a lot of discussion about that on the web, which was informative, but not helpful. Let...
7
by: Sek | last post by:
Hi Folks! I was pondering over a code and noticed that exception handlers were present in the private, protected as well as public methods. And, ofcourse, public methods were calling priv/prot...
2
by: Darko Miletic | last post by:
Recently I wrote a dll in c++ and to simplify the distribution I decided to link with multithreaded static library (/MT or /MTd option). In debug everything works fine but in release I get this: ...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
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,...
0
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...
0
Oralloy
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,...

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.