Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2016
    Posts
    1

    Unanswered: Access connect to Informix database

    Hi,

    I have a report that I export from Access to Excel. Before I do that I need to generate a query in Access that have a connection with an Informix database. When I ask to run the query a pop up ask for login/password.
    How can I automate this?
    Or how can I create a string connection so when I run the query the connection with the server is already stabilish?

    I tried this:

    Private Sub testConection()
    Dim cn As New ADODB.Connection

    DoCmd.SetWarnings False


    Set cn = New ADODB.Connection


    cn.ConnectionString = "DRIVER={OpenLink Generic 32 Bit Driver v4.0};DNS=CMS;_ServerType=Informix 2000;Host=10.187.0.24;Port=5000;Database=;FetchBuf ferSize=30;NoLoginBox=No;Proto
    col=TCP/IP;ReadOnly=No;ServerOptions=;DeferLongFetch=Yes;T ABLE=root_hsplit;Uid=***user**
    *;PASSWORD=***password***"
    cn.Open

    DoCmd.OpenQuery "01 - Criar base skill", acViewNormal, acRead

    cn.Close

    End Sub

    The Access file open without password, the password is asked when I call the query.

    Thanks!

  2. #2
    Join Date
    Sep 2011
    Location
    Pont l'Abbé, Brittany, France
    Posts
    394
    Provided Answers: 1
    Hi


    supposedly, you have to create an ODBC system data source for Informix thru MS ODBC Administrator
    In the Connection tab, you'll have to specify
    server Name = name of the informix instance ( ask your DBA)
    Host name = host name of the informix server (make sure you have access to it)
    service = port number of informix instance ( ask your DBA )
    protocol = olsoctcp
    options = Ask you DBA if necessary ( CLIENT_LOCALE etc...)
    database Name = name of the db you want to access
    user id = name of your user id
    passwd = password of this ID.

    Watch out: your user ID+hostname ( name of your PC) must be authenticated by your DBA on the Informix SERVER

    Hope this helps

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •