Solved

dao 3.6, VBA, and iSeries Access ODBC driver

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now