Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Errors connection to SQL Server Express

Discussion in 'Information Technology' started by Chris Burnette, Nov 16, 2005.

  1. Chris Burnette

    Chris Burnette
    Expand Collapse
    Guest

    I have a bound form in Access that users will use to access the data in a SQL
    Server Express database via a linked table. However, when I try to open the
    form I get the message:

    Login failed for user (null); not associated with a trusted SQL Server
    connection.

    The SQL Server Login box then appears. I enter the server name and my SA
    username and password, which I use to log in to the server. I then get the
    message:

    Connection failed:
    SQLState: '08004'
    SQL Server Error: 4060
    Server rejected the connection; Access to selected database has been denied.

    I don't understand this message. I never had trouble connecting to the DB
    with my SA login in MSDE, but for some reason I am having problems with
    Express. I started the Browser service and enabled TCP/IP, so that shouldn't
    be a problem, and I'm trying to connect to an instance on my local machine
    anyway. I can connect to SQL Server Express Management Studio with my SA
    login, so I am thinking the problem must be with connecting via Access.

    I use a login form that passes the user's username and password to SQL
    Server via a connection string, and I can login without error using this
    form (I had to change the port in the connection string from 1433 as I think
    that was conflicting with MSDE).

    Does anyone have any ideas why I might be having this problem with Express?
    Any suggestions would be appreciated.

    Thanks,

    Chris
     
  2. Loading...

    Similar Threads Forum Date
    Controversial Errors in Birs: All Eyes Set on Akal Takht Meet Hard Talk Jul 23, 2011
    Some database errors while navigating SPN forums Announcements Dec 29, 2004
    connection! Blogs Oct 17, 2015
    Still No Connection Blogs Oct 17, 2015
    connection Blogs Oct 16, 2015

  3. Sylvain Lafontaine

    Sylvain Lafontaine
    Expand Collapse
    Guest

    Try stopping the MSDE service and connect to SQL-Express using the regular
    port 1433 to see if the problem is coming from that.

    If you specify the port number, the Browser service won't be used, so you
    must make sure that the default port has been correctly changed for
    SQL-Server. Instead of trying to set the port number, you should add the
    name of the instance after the name of the server in the connection string:
    localhost\SQLExpress.

    If TCP/IP won't work, then try using a named pipe: (local)\SQLEXPRESS

    I don't have SQL-Server Express 2005, so I cannot tell you if the name of
    the instance if really SQLEXPRESS; you should use whatever you really have
    instead.

    --
    Sylvain Lafontaine, ing.
    MVP - Technologies Virtual-PC
    E-mail: http://cerbermail.com/?QugbLEWINF


    "Chris Burnette" <ChrisBurnette@discussions.microsoft.com> wrote in message
    news:2C645A97-747A-4037-92BA-B343BAD6225C@microsoft.com...
    >I have a bound form in Access that users will use to access the data in a
    >SQL
    > Server Express database via a linked table. However, when I try to open
    > the
    > form I get the message:
    >
    > Login failed for user (null); not associated with a trusted SQL Server
    > connection.
    >
    > The SQL Server Login box then appears. I enter the server name and my SA
    > username and password, which I use to log in to the server. I then get
    > the
    > message:
    >
    > Connection failed:
    > SQLState: '08004'
    > SQL Server Error: 4060
    > Server rejected the connection; Access to selected database has been
    > denied.
    >
    > I don't understand this message. I never had trouble connecting to the DB
    > with my SA login in MSDE, but for some reason I am having problems with
    > Express. I started the Browser service and enabled TCP/IP, so that
    > shouldn't
    > be a problem, and I'm trying to connect to an instance on my local machine
    > anyway. I can connect to SQL Server Express Management Studio with my SA
    > login, so I am thinking the problem must be with connecting via Access.
    >
    > I use a login form that passes the user's username and password to SQL
    > Server via a connection string, and I can login without error using this
    > form (I had to change the port in the connection string from 1433 as I
    > think
    > that was conflicting with MSDE).
    >
    > Does anyone have any ideas why I might be having this problem with
    > Express?
    > Any suggestions would be appreciated.
    >
    > Thanks,
    >
    > Chris
     
  4. Chris Burnette

    Chris Burnette
    Expand Collapse
    Guest

    Thanks for the reply. It turns out my connection string was correct but I
    just had my tabledef linked to the wrong server. I fixed the tabledef and it
    works now.

    Thanks,

    Chris

    "Sylvain Lafontaine" wrote:

    > Try stopping the MSDE service and connect to SQL-Express using the regular
    > port 1433 to see if the problem is coming from that.
    >
    > If you specify the port number, the Browser service won't be used, so you
    > must make sure that the default port has been correctly changed for
    > SQL-Server. Instead of trying to set the port number, you should add the
    > name of the instance after the name of the server in the connection string:
    > localhost\SQLExpress.
    >
    > If TCP/IP won't work, then try using a named pipe: (local)\SQLEXPRESS
    >
    > I don't have SQL-Server Express 2005, so I cannot tell you if the name of
    > the instance if really SQLEXPRESS; you should use whatever you really have
    > instead.
    >
    > --
    > Sylvain Lafontaine, ing.
    > MVP - Technologies Virtual-PC
    > E-mail: http://cerbermail.com/?QugbLEWINF
    >
    >
    > "Chris Burnette" <ChrisBurnette@discussions.microsoft.com> wrote in message
    > news:2C645A97-747A-4037-92BA-B343BAD6225C@microsoft.com...
    > >I have a bound form in Access that users will use to access the data in a
    > >SQL
    > > Server Express database via a linked table. However, when I try to open
    > > the
    > > form I get the message:
    > >
    > > Login failed for user (null); not associated with a trusted SQL Server
    > > connection.
    > >
    > > The SQL Server Login box then appears. I enter the server name and my SA
    > > username and password, which I use to log in to the server. I then get
    > > the
    > > message:
    > >
    > > Connection failed:
    > > SQLState: '08004'
    > > SQL Server Error: 4060
    > > Server rejected the connection; Access to selected database has been
    > > denied.
    > >
    > > I don't understand this message. I never had trouble connecting to the DB
    > > with my SA login in MSDE, but for some reason I am having problems with
    > > Express. I started the Browser service and enabled TCP/IP, so that
    > > shouldn't
    > > be a problem, and I'm trying to connect to an instance on my local machine
    > > anyway. I can connect to SQL Server Express Management Studio with my SA
    > > login, so I am thinking the problem must be with connecting via Access.
    > >
    > > I use a login form that passes the user's username and password to SQL
    > > Server via a connection string, and I can login without error using this
    > > form (I had to change the port in the connection string from 1433 as I
    > > think
    > > that was conflicting with MSDE).
    > >
    > > Does anyone have any ideas why I might be having this problem with
    > > Express?
    > > Any suggestions would be appreciated.
    > >
    > > Thanks,
    > >
    > > Chris

    >
    >
    >
     

Share This Page