Solved

dao 3.6, VBA, and iSeries Access ODBC driver

Posted on 2011-02-17
2
1,557 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
  • 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Search for text in a .txt file 14 43
Top 1 of each supplier 55 55
Binding recordsets to a form 6 23
Criteria for Date for DCount 4 19
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

776 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