Results 1 to 2 of 2
\r\n \r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n Hi,
\r\n
\r\nI 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.
\r\nHow can I automate this?
\r\nOr how can I create a string connection so when I run the query the connection with the server is already stabilish?
\r\n
\r\nI tried this:
\r\n
\r\nPrivate Sub testConection()
\r\nDim cn As New ADODB.Connection
\r\n
\r\nDoCmd.SetWarnings False
\r\n
\r\n
\r\nSet cn = New ADODB.Connection
\r\n
\r\n
\r\ncn.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
\r\ncol=TCP/IP;ReadOnly=No;ServerOptions=;DeferLongFetch=Yes;T ABLE=root_hsplit;Uid=***user**
\r\n*;PASSWORD=***password***"
\r\ncn.Open
\r\n
\r\nDoCmd.OpenQuery "01 - Criar base skill", acViewNormal, acRead
\r\n
\r\ncn.Close
\r\n
\r\nEnd Sub
\r\n
\r\nThe Access file open without password, the password is asked when I call the query.
\r\n
\r\nThanks!
\r\n
\r\n
\r\n\r\n \r\n\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n'; pd[6650283] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #2\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n begooden-it is offline\r\n\r\n \r\n \r\n Registered User\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Sep 2011
    \r\n
    Location
    Pont l\'Abbé, Brittany, France
    \r\n \r\n
    Posts
    394
    \r\n \r\n
    \r\n \r\n
    Provided Answers: 1
    \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n Hi
    \n
    \n
    \nsupposedly, you have to create an ODBC system data source for Informix thru MS ODBC Administrator
    \nIn the Connection tab, you\'ll have to specify
    \nserver Name = name of the informix instance ( ask your DBA)
    \nHost name = host name of the informix server (make sure you have access to it)
    \nservice = port number of informix instance ( ask your DBA )
    \nprotocol = olsoctcp
    \noptions = Ask you DBA if necessary ( CLIENT_LOCALE etc...)
    \ndatabase Name = name of the db you want to access
    \nuser id = name of your user id
    \npasswd = password of this ID.
    \n
    \nWatch out: your user ID+hostname ( name of your PC) must be authenticated by your DBA on the Informix SERVER
    \n
    \nHope this helps
    \r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; // next/previous post info pn[6644073] = "6650283,6650283"; pn[0] = ",6644073"; pn[6650283] = "6644073,6644073"; // cached usernames pu[0] = guestphrase; pu[363595] = "paranation"; pu[276746] = "begooden-it"; // -->

    Threaded View

    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!

    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
    •