Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 27th, 2007, 08:30 AM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
Default error on connecting to sql server

hi expert
i want to coonect sql server 2000 from my app
i create a login in enterprise manager with this user id and password
user id =mahdi
passwod = kiani

my connection string is
"data source=(local);initial catalog=test;user id=mahdi;password=kiani"

when i run application i get the fowing error
Login failed for user 'mahdi'. Reason: Not associated with a trusted SQL Server connection.

where is the problem?

thanks
regards
kiani,mahdi
 
Old March 27th, 2007, 08:40 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Open enterprise manager --> Right Click on the SQL Server node you are trying to connect to --> Select properties --> Security Tab --> Use SQL Server and Windows Authentication.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old March 27th, 2007, 09:23 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Have you associated mahdi with a user for the Test catalogue?

--

Joe (Microsoft MVP - XML)
 
Old March 28th, 2007, 03:37 AM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks dparsons

my problem has been solved
but i have another problem
i set permission on STUDENT table for mahdi
mahdi permission sets that can not select above table
but when i "write select * from STUDENT" , my data shows in my dataGridview
user 'mahdi' doesn't permission on STUDENT table
where is the problem?
 
Old March 28th, 2007, 08:36 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

How did you set the permissions? Maybe the account inherits rights somehow? Did you try an explicit deny?

Imar

P.S. Did you receive my reply to your personal message?


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old March 28th, 2007, 12:36 PM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi Imar
how can i set permission explicity?
and i dont recive any reply from you
if it is possible for you sent your reply to this email : [email protected]

thanks again
kiani,mehdi
 
Old March 28th, 2007, 01:27 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I mailed you at your mb.santiago account.

If you click the check box for the permissions a few times it will change every time, from not set, to allowed to explicitly denied.

How did *you* set the permissions?>

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old March 29th, 2007, 03:17 AM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi Imar and thasks so much for your reply(s)
i realy don't recive any email from you
i check my account ([email protected]) every day but i don't found any mail from you
please resent to me,thanks again

but about setting permission :
I set permission according to following steps

in enterprise manager i right click on my table <STUDENT> and then i click on permission
in object comboBox I select STUDENT(dbo)
and in following the combo box i set permission for my user (mahdi)
I set SELECT,UPDATE,INSERT,DELETE permission for user(mahdi) to deny by checked (* red) character

and then I clicked ok button

I set permission according the above steps

is it right?

great apperciation dear Imar for your reply(s) again
and I'm waiting so for your personal message in my account([email protected])
thanks again dear Imar
kiani,mahdi
 
Old March 29th, 2007, 04:26 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
quote:is it right?
Only you can tell. What happens when you try to select data from the table?

But yes, this is generally how you would deny access to a specific table.
But why do you want a deny at all?

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old March 29th, 2007, 07:56 AM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
Default

just I want to see action of users permission

dear Imar
still..I don't recive email from you

do you resend it to me?
thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
URGENT:Connecting SQL server through Proxy server abhowal Pro VB Databases 2 January 9th, 2006 01:47 PM
URGENT:Connecting SQL server through Proxy server abhowal SQL Server 2000 3 November 30th, 2005 04:22 AM
ASP error when connecting to a new SQL server Cinderella Classic ASP Basics 2 June 21st, 2005 10:00 AM
Error in connecting to sql server 2000 using asp method SQL Server 2000 1 March 7th, 2005 11:05 PM
URGENT:Connecting SQL server through Proxy server sankar SQL Server 2000 0 August 26th, 2003 03:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.