Re: connection string help

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Chris Jackson (chrisjATmvpsDOTorgNOSPAM)
Date: 02/18/04


Date: Wed, 18 Feb 2004 14:23:06 -0500

Since you are using Windows authentication, this connection string will only
work for you if the account you are running under (your ID for WinForms,
ASPNET by default for WebForms - though you can use impersonation to
authenticate with a domain account) has permissions on that server.

-- 
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
-- 
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
-- 
"Mike" <csharpcoder@sbcglobal.net> wrote in message 
news:OZEHSMl9DHA.1816@TK2MSFTNGP12.phx.gbl...
> I'm trying to connect to a SQL db, I have the db setup as a DSN on my
> machine, here is my connection string that i'm trying to use.
>
> string dbConn = "Provider=sqloeldb;data source=Tech;Initial
> Catalog=Tech;Integrate Security=SSPI;";
>
> on my page I get this error;
>
> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access
> denied.
>
>
> and the error is pointing to
>
> mbConn.Open() \\line
>
> amd i missing something or doing something wrong?
>
> 


Relevant Pages

  • Re: sql server connection
    ... The reason why I am using windows authentication ... Windows account for database access. ... So I created a special windows account and gave it database permissions to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Bizzare SQL Network Error
    ... Try making sure the SQL account that you put into the connection string ... The reason the Windows app worked was because it used the account of the ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: sysprocesses and Visual Basic Program
    ... A Best Practice is to never use a sysadmin role member account like 'sa' for ... You can grant a Windows account access to your database as follows: ... Id=MyUser;Password=MyPassword' in your connection string. ... I did see that I could use windows authentication. ...
    (microsoft.public.sqlserver.programming)
  • Re: Newbie Question - "trusted SQL Server connection"
    ... you want to use Windows authentication. ... which is the windows authentication information you are passing. ... removing this from your connection string if your intention is to use SQL ... > - generate a data set ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: login failed for user ... Not Associated with a trusted SQL Se
    ... Well I changed my connection string but the error message is still the same, ... It uses windows authentication. ...
    (microsoft.public.sqlserver.connect)