Solved

dao 3.6, VBA, and iSeries Access ODBC driver

Posted on 2011-02-17
2
1,573 Views
Last Modified: 2012-05-11
Hi,
how to connect a recordet using dao 3.6
to a odbc machine?
I have already the connection string
Dim connStr As String
   connStr = "Driver={iSeries Access ODBC Driver};System=clientaccess;Uid=XXX;Pwd=yyy;"

but I dont know how to connect a database and so a recordset to a specific table on this position,
using dao 3.6 and vba in excel

thanks
0
Comment
Question by:bobdylan75
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 

Accepted Solution

by:
bobdylan75 earned 0 total points
ID: 34917140
Sorry
resolved by ADODB
Public Const pathdocs = "c:\docs"
Public cwI5Servent As New ADODB.Connection

Sub create_docs()

    
    Dim FORNIT As New ADODB.Recordset
    cwI5Servent.CursorLocation = ADODB.CursorLocationEnum.adUseClient
    Dim connStr As String
    connStr = "Driver={iSeries Access ODBC Driver};System=192.168.54.200;DATABASE=QS36F;Uid=pcs;Pwd=pcs;"
    cwI5Servent.Open (connStr)
    
    Set FORNIT = cwI5Servent.Execute("SELECT * FROM QS36F.DDSG001")
    
    FORNIT.MoveFirst
    While Not FORNIT.EOF
        MsgBox FORNIT.Fields("gcdrag").Value
        FORNIT.MoveNext
    Wend
    
    FORNIT.Close
    'Dim O As Object
    'O = fornitori.Open("SELECT * FROM QS36F.DDSG001", cwI5Servent, adOpenStatic, adLockOptimistic)

    cwI5Servent.Close

End Sub

Open in new window

0
 

Author Closing Comment

by:bobdylan75
ID: 34917149
Sorry I resolved by myself
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question