Solved

vb.net and access database help

Posted on 2009-04-04
5
379 Views
Last Modified: 2012-05-06
Hello

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.



LINK TO VIDEO
https://member.developer.intuit.com/MyIDN/technical_resources/qb_sdk/default.aspx?id=1772


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 ()"
 
                    resp.ResponseList.GetAt(i)
 
                Next
            End If
 
 
 
 
        End If
 
        qbxmlrp.CloseConnection()
        qbxmlrp = Nothing
 
 
    End Sub
End Class

Open in new window

0
Comment
Question by:Chris Jones
[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
5 Comments
 
LVL 1

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
0
 
LVL 46

Accepted Solution

by:
tbsgadi earned 500 total points
ID: 24070386
0
 
LVL 1

Author Closing Comment

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

Expert Comment

by:tbsgadi
ID: 24074593
Glad to help!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

623 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