May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.
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
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Sub form showing data is being saved but cannot be displayed..||31||69|
|Select coumns form Data table?||3||27|
|Updating Printer Details in VB.Net||16||43|
|DateSerial Function. I receive "Data mismatch" when adding "Between Date" criteria Expression||3||41|
Join the community of 500,000 technology professionals and ask your questions.