Solved

dao 3.6, VBA, and iSeries Access ODBC driver

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
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 …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

863 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

20 Experts available now in Live!

Get 1:1 Help Now