Solved and access database help

Posted on 2009-04-04
Last Modified: 2012-05-06

i am trying to follow some code i seen online and dont understand how to make it all work i need some help can someone follow the code in this video and explain to me what i am doing wrong.


i have some code but its not working
Imports Interop.QBFC7

Imports MSXML2

Imports QBXMLRP2Lib

Imports System

Imports System.Runtime.Remoting

Imports System.Runtime.Remoting.Channels

Imports Microsoft.VisualBasic

Imports Microsoft.Office.Interop.Access

Public Class Sync

    Dim l As Label ' lable that shows the user thatrs loged in 

    Dim rs As ADODB.Recordset ' recorde set for the connection 

    Dim sqlstmt As String

    Dim id As String

    Dim linkn As String

    Dim pointer1 As String

    Dim ct As Integer = 0

    Dim zone As String

    Dim DateNow As Date = Now

    Dim DateToday As Date = Today

    Dim HRDBConn As ADODB.Connection

    Dim ConnTechnologyServices As ADODB.Connection

    Dim ConnLeoPortal As ADODB.Connection

    Dim i As Integer

    Private Sub localDBConnectionOpen()

        ConnLeoPortal = DBConnectionOpen(ConnLeoPortal, "c:\QB\QBSDKVB.mdb", "")

    End Sub

    Private Sub localDBConnectionClose()

        ConnLeoPortal = DBConnectionClose(ConnLeoPortal)

    End Sub

    Private Sub Sync_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Call localDBConnectionOpen()

        sqlstmt = "SELECT * FROM QBInvoice"

        rs = DBRecordSetNewFast(ConnLeoPortal, sqlstmt)

        ' Dim qbxmlrp As RequestProcessor2

        Dim qbxmlrp As New QBOESessionManager

        qbxmlrp.OpenConnection("", " Sync App")

        qbxmlrp.BeginSession("", ENOpenMode.omDontCare)

        Dim msgReq As IMsgSetRequest

        msgReq = qbxmlrp.CreateMsgSetRequest("US", 3, 0)

        Dim query As IInvoiceQuery

        query = msgReq.AppendInvoiceQueryRq

        Dim resp As IMsgSetResponse

        resp = qbxmlrp.DoRequests(msgReq)

        Dim replist As IResponse

        replist = resp.ResponseList.GetAt(0)

        Dim currep As IResponse

        currep = replist

        If currep.StatusCode < 0 Then

            Dim resptype As IResponse

            resptype = currep.Type

            If currep.Type.GetValue Then

                Dim invoice As IInvoiceQuery

                invoice = currep.Detail

                Dim curlist As IInvoiceRet

                currep = resp.ResponseList.GetAt(i)

                For i = 0 To 10

                    sqlstmt = "Insert into QBInvoice (Type,Date,Name,Num,Class,CLR,Splits,Amount,Balance) values ()"



            End If

        End If


        qbxmlrp = Nothing

    End Sub

End Class

Open in new window

Question by:Chris Jones
  • 2
  • 2

Author Comment

by:Chris Jones
ID: 24067777
in my code i am trying to get QB(quick books data from Quickbooks and place it into my access database i dont know how to get the QB values and place in my database
LVL 46

Accepted Solution

tbsgadi earned 500 total points
ID: 24070386

Author Closing Comment

by:Chris Jones
ID: 31566592
thanks this kinda works
LVL 46

Expert Comment

ID: 24074593
Glad to help!

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

895 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

17 Experts available now in Live!

Get 1:1 Help Now