473,473 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

SQL Connection help needed

I'm using visual studio 2005 and SQL 2000, trying to connect to a sql
database as a differnent user.

Here is my current connection string that is using my own NT login:

Dim message As String = "Data Source=" +
Me.ComboBox1.Text.ToString() + ";Initial Catalog=Store;Integrated
Security=SSPI"
Dim sql As New SqlClient.SqlConnection(message)

sql.Open()

I have access to this database and the connection establishes fine.
However i dont have access to certain Stored Procedure's on this
database and these run through a differnt NT user.

I dont have access to a SQL user name and password so i cant hardcode
the "sa" login instead.

Does anyone know if i can change my connection string above to use
another windows/NT login?

Awaiting reply,
Andy

Apr 19 '06 #1
6 1220
Hi,

I would talk to your data base administrator and see if you can
be given access to the stored procedure.

Ken
-------------

"Backwards" wrote:
I'm using visual studio 2005 and SQL 2000, trying to connect to a sql
database as a differnent user.

Here is my current connection string that is using my own NT login:

Dim message As String = "Data Source=" +
Me.ComboBox1.Text.ToString() + ";Initial Catalog=Store;Integrated
Security=SSPI"
Dim sql As New SqlClient.SqlConnection(message)

sql.Open()

I have access to this database and the connection establishes fine.
However i dont have access to certain Stored Procedure's on this
database and these run through a differnt NT user.

I dont have access to a SQL user name and password so i cant hardcode
the "sa" login instead.

Does anyone know if i can change my connection string above to use
another windows/NT login?

Awaiting reply,
Andy

Apr 19 '06 #2
I have spoken with our DBA's and have been instructed to logon and run
it as this user so they can track the usage of the stored procedure

Andy

Apr 19 '06 #3
Backwards wrote:
I have spoken with our DBA's and have been instructed to logon and run
it as this user so they can track the usage of the stored procedure


And they're too mean to tell you you need to supply the User ID and Password
parameters in the connection string?

This may help:-
http://www.connectionstrings.com/

Andrew
Apr 19 '06 #4
The only problem is the username and password you can pass in the
string tries to connect using SQL not windows logins.
Nice link though, good one to hold onto.

Apr 19 '06 #5
This means you can't run the stored procedure if you connect using
integrated and running as yourself.

You need to either:
1) run as this other user, meaning their NT login, so windows auth works
2) Have your DB Admin give your NT login access to the stored procedure
3) Not use windows auth, but use a SQL login, that does have access to the
stored procedure

Since, I doubt #1 is an option here, it's really up to your DB admin to do
some work and give you access in some way to the stored procedure.

"Backwards" <An****@technicaltraining.co.nz> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.com...
I'm using visual studio 2005 and SQL 2000, trying to connect to a sql
database as a differnent user.

Here is my current connection string that is using my own NT login:

Dim message As String = "Data Source=" +
Me.ComboBox1.Text.ToString() + ";Initial Catalog=Store;Integrated
Security=SSPI"
Dim sql As New SqlClient.SqlConnection(message)

sql.Open()

I have access to this database and the connection establishes fine.
However i dont have access to certain Stored Procedure's on this
database and these run through a differnt NT user.

I dont have access to a SQL user name and password so i cant hardcode
the "sa" login instead.

Does anyone know if i can change my connection string above to use
another windows/NT login?

Awaiting reply,
Andy

Apr 19 '06 #6
So what your saying is that the .net framwork 2.0 doesnt support a sql
connection as another windows user but only a SQL user?

Apr 19 '06 #7

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

Similar topics

2
by: Ryan P. Kennedy | last post by:
Hi: I have a Point-of-sale application that uses SQL Server2000 for the backend. Basically, the users perform various functions boiling down to login (check password from a table) and data entry...
2
by: Bryan | last post by:
Hello, I'm just starting to develop in asp.net and i have a question about using a database connection globally in my app. I have set up the procedures for getting all my connection string info...
35
by: Eric Sabine | last post by:
In my Finally block, I was using cn.close (where cn is an ADO.NET connection object, SQLConnection to be exact) and then I came across the following in some microsoft code. If Not cn Is Nothing...
35
by: Terry Jolly | last post by:
Web Solution Goal: Have a global database connection Why: (There will be 30+ tables, represented by 30+ classes) I only want to reference the database connection once. I put the connection...
1
by: Sankalp | last post by:
Hi, I am using VB 2005. My application has many data bound controls. The connection is stored in the app.config file. I want the application to start with a default connection string and while...
3
by: fniles | last post by:
In the Windows application (using VB.NET 2005) I use connection pooling like the following: In the main form load I open a connection using a connection string that I stored in a global variable...
13
by: Jennifer.Berube | last post by:
well I'm not sure how to go about making my SQL connection string... The code below is what I need to replace with my SQL connection...I just don't know if that code is for DSN or access... I...
1
by: archana | last post by:
Hi all, I am new to asp.net. I am developing one application. I want to open and close connection for session. Means when user first time logged in i want to open connection and store that in...
2
by: pmclinn | last post by:
When I'm connecting to Oracle or SQL I always wonder what is the best way to close/dispose of a connection. I've been toying around with creating a public shared class that has a connection string...
3
by: John | last post by:
Hi I have a windows form app with one master table and several details (grids). As I am filling both the master and details using vs 2005 generated dataset and data adapters, there are multiple...
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,...
1
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...
0
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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...

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.