Results 1 to 4 of 4

Thread: Connecting to AS400

  1. #1
    Join Date
    Apr 2009
    Posts
    22

    Connecting to AS400

    I want to connect my Asp.Net C# Application to a AS/400 database. When i try to connect database it gives me an error message : Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.Does anyone know what causes this issue and how to fix it?Any help will be extremely appreciated.

  2. #2
    Join Date
    Dec 2008
    Posts
    177

    Re: Connecting to AS400

    Make sure to include the Trusted_Connection=yes connection string parameter in the ADO connection string. If you do not include this parameter, the above-mentioned error occurs even if the Windows NT/Windows 2000 user account that is used to process the request for the ASP page has a corresponding Windows authentication login in SQL Server.

    Make sure to specify the UID and the PWD connection string parameters if you want to use standard SQL Server authentication to establish a database connection. You must specify these parameters even if the configuration properties of the DSN are set to use standard SQL Server authentication. If you fail to specify these parameters, IIS tries to open a trusted connection to the database.

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    Re: Connecting to AS400

    Check this thread with similar issue : Error Microsoft OLE DB Provider for ODBC Drivers


    Try this instead:

    oConn.Open "Provider=sqloledb;" & _

    "Data Source=myServerName;" & _

    "Initial Catalog=myDatabaseName;" & _

    "User Id=myUsername;" & _

    "Password=myPassword"

  4. #4
    Join Date
    May 2008
    Posts
    2,012

    Re: Connecting to AS400

    To use standard SQL Server authentication to establish a connection, it is essential that you configure the security settings on the target SQL Server to permit Mixed mode (NT and SQL Server) authentication. If you specify a valid UID and omit the PWD parameter in the connection string, when the specified User ID contains a non-blank password, you receive the following error
    message:Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
    [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user <SQL Server User Id specified in the connection string>.

Similar Threads

  1. Import AS400 formated text into InDesign?
    By Braasch in forum Windows Software
    Replies: 3
    Last Post: 16-07-2010, 04:38 PM
  2. Connecting my Wii to my PC
    By Savannah87 in forum Video Games
    Replies: 5
    Last Post: 25-04-2010, 03:02 AM
  3. Access queries on AS400
    By Ujagar in forum Software Development
    Replies: 5
    Last Post: 13-02-2010, 09:23 AM
  4. Connecting PSP to Via PS3
    By Brian z. in forum Networking & Security
    Replies: 2
    Last Post: 30-08-2008, 06:34 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,306,706.72147 seconds with 17 queries