|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SQL Connection help neededdatabase 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 Hi,
I would talk to your data base administrator and see if you can be given access to the stored procedure. Ken ------------- Show quoteHide quote "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 > > 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 Backwards wrote:
> I have spoken with our DBA's and have been instructed to logon and run And they're too mean to tell you you need to supply the User ID and Password > it as this user so they can track the usage of the stored procedure parameters in the connection string? This may help:- http://www.connectionstrings.com/ Andrew 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. 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. Show quoteHide quote "Backwards" <And***@technicaltraining.co.nz> wrote in message news:1145437775.650278.321540@z34g2000cwc.googlegroups.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 > 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?
How to call IE to open a new page.
Listview SubItems image index Emailing with default client Writing INI section failing webbrowser System.IO.FileNotFoundException 1.1 and 2.0 .Net framework in same application? Is it possible to compile an image file into a DLL or EXE file? how to move a form that FormBorderStyle is None Listview item key button with drop down |
|||||||||||||||||||||||