By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,912 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

How to read .iif file of Quickbooks using vb or any code

P: n/a
Hi,
Actually i am facing some problem using quickbooks and presently i am
not so expert in using it.

I am using c# code to retrive the data from quickbooks.
it doesn't matter which language we are using.
So i have .iif file of employee list,so through code i have to read .iif
file and get the data out of it and store that data in database.

As i can use QuickBook only to import .iif file and from quickbook i can
read the data, but there will be many .iif files, so i should read it
dynamically and store it in database.And there should be no intervention
of QuickBook SDK in this process.

so my problem is,i need quickbook sdk code such that i can read .iif
file and retrive the data.

so, please can u help me with any suggestions or any good tutorials
concerned to this.

Thank you,

Regards,
Raghu

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Mon, 12 Sep 2005 11:44:07 GMT, Raghu Gupta <am*********@yahoo.com> wrote:
Hi,
Actually i am facing some problem using quickbooks and presently i am
not so expert in using it.

I am using c# code to retrive the data from quickbooks.
it doesn't matter which language we are using.
So i have .iif file of employee list,so through code i have to read .iif
file and get the data out of it and store that data in database.

As i can use QuickBook only to import .iif file and from quickbook i can
read the data, but there will be many .iif files, so i should read it
dynamically and store it in database.And there should be no intervention
of QuickBook SDK in this process.

so my problem is,i need quickbook sdk code such that i can read .iif
file and retrive the data.

so, please can u help me with any suggestions or any good tutorials
concerned to this.

Thank you,

Regards,
Raghu

*** Sent via Developersdex http://www.developersdex.com ***


Hi
you could try posting in alt.comp.software.financial.quickbooks which seems to be an active group

Nov 13 '05 #2

P: n/a
bc3
rude person wrote:
On Mon, 12 Sep 2005 11:44:07 GMT, Raghu Gupta <am*********@yahoo.com> wrote:

Hi,
Actually i am facing some problem using quickbooks and presently i am
not so expert in using it.

I am using c# code to retrive the data from quickbooks.
it doesn't matter which language we are using.
So i have .iif file of employee list,so through code i have to read .iif
file and get the data out of it and store that data in database.

As i can use QuickBook only to import .iif file and from quickbook i can
read the data, but there will be many .iif files, so i should read it
dynamically and store it in database.And there should be no intervention
of QuickBook SDK in this process.

so my problem is,i need quickbook sdk code such that i can read .iif
file and retrive the data.

so, please can u help me with any suggestions or any good tutorials
concerned to this.

Thank you,

Regards,
Raghu

*** Sent via Developersdex http://www.developersdex.com ***

Hi
you could try posting in alt.comp.software.financial.quickbooks which seems to be an active group

' Parse response XML from QuickBooks using MSXML parser
Public Function ParseResponseXML(elementName As String) As Boolean

On Error GoTo ErrHandler

resListID = ""

Dim retStatusCode As String
Dim retStatusMessage As String
Dim retStatusSeverity As String

' Create xmlDoc Obj

' DOM Document Object
Dim xmlDoc As New MSXML2.DOMDocument40

' DOM Node list object for looping through
Dim objNodeList As IXMLDOMNodeList

' Node objects
Dim objChild As IXMLDOMNode
Dim custChildNode As IXMLDOMNode
Dim invoiceChildNode As IXMLDOMNode

' Attributes Name Mapping
Dim attrNamedNodeMap As IXMLDOMNamedNodeMap

Dim i As Integer
Dim ret As Boolean
Dim errorMsg As String

errorMsg = ""

' Load xml doc
ret = xmlDoc.loadXML(responseXML)
If Not ret Then
errorMsg = "loadXML failed, reason: " & xmlDoc.parseError.Reason
GoTo ErrHandler
End If

' Get nodes list
Set objNodeList = xmlDoc.getElementsByTagName(elementName)

' Loop through each node
' Since we have only one request, we should only have one
' response. The loop is actually unnecessary, but it
' is a good programming practice
For i = 0 To (objNodeList.length - 1)

' Get the CustomerRetRs
Set attrNamedNodeMap = objNodeList.Item(i).Attributes

' Get the status Code, info and Severity
'
retStatusCode =
attrNamedNodeMap.getNamedItem("statusCode").nodeVa lue
retStatusSeverity =
attrNamedNodeMap.getNamedItem("statusSeverity").no deValue
retStatusMessage =
attrNamedNodeMap.getNamedItem("statusMessage").nod eValue

' Check status code to see if there is error or warning
If retStatusCode <> "0" Then
' Checking for Warning is a good practice, although
unlikely to happen
' on an add request.
If retStatusSeverity = "Warning" Then
' Show the warning, then continue normal processing
MsgBox retStatusMessage, vbExclamation, "Warning from
QuickBooks"
ElseIf retStatusSeverity = "Error" Then
MsgBox retStatusMessage, vbExclamation, "Error from
QuickBooks"
' We only have one response thus we will exit. If we
have multiple
' responses, then we may want to continue with the loop.
ParseResponseXML = False
Exit Function
End If
End If

' Look at the child nodes
For Each objChild In objNodeList.Item(i).childNodes

' Get the CustomerRet block if we were adding a customer
If objChild.nodeName = "CustomerRet" Then

' Get the elements in this block
For Each custChildNode In objChild.childNodes
If custChildNode.nodeName = "ListID" Then
resListID = custChildNode.Text
ElseIf custChildNode.nodeName = "Name" Then
resCustName = custChildNode.Text
ElseIf custChildNode.nodeName = "FullName" Then
resCustFullName = custChildNode.Text
End If
Next

End If ' End of customerRet
' Get the "InvoiceQueryRet" if we were looking for
' an in-use customer by querying for invoices -- if
' we find one of these, we'll have all the information
' we need and can then break from the function.
If objChild.nodeName = "InvoiceRet" Then

For Each invoiceChildNode In objChild.childNodes
If invoiceChildNode.nodeName = "CustomerRef" Then

' Get the elements in this block
For Each custChildNode In
invoiceChildNode.childNodes
If custChildNode.nodeName = "ListID" Then
resListID = custChildNode.Text
ElseIf custChildNode.nodeName = "Name" Then
resCustName = custChildNode.Text
ElseIf custChildNode.nodeName = "FullName" Then
resCustFullName = custChildNode.Text
End If
Next

' If we get here, we have all the information
we need
GoTo BreakPoint

End If
Next

End If ' end of InvoiceQueryRet
' Get the Customer Name if we were deleting a customer
If elementName = "ListDelRs" And objChild.nodeName =
"FullName" Then
custName = objChild.Text
End If ' end of ListDelType
Next
Next

BreakPoint:
ParseResponseXML = True
Exit Function

ErrHandler:
If errorMsg <> "" Then
MsgBox errorMsg, vbExclamation, "Error"
Else
MsgBox Err.Description, vbExclamation, "Error"
End If
ParseResponseXML = False
Exit Function

End Function
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.