Home > Uncategorized > Reading a company’s VAT number from sage

Reading a company’s VAT number from sage

Dim SDO                 As SageDataObject90.sdoEngine
    Dim WS                  As SageDataObject90.WorkSpace
    Dim sdoCompany          As SageDataObject90.SetupData
           
    Set SDO = New SageDataObject90.sdoEngine
    Set WS = SDO.Workspaces.Add("Myconnection")
   
    ‘Connect to data files
    WS.Connect SageLocation, SageUsername, SagePassword, "ThisIsUnique"
   
    ‘Create an instance of InvoicePost & Record object’s
    Set sdoCompany = WS.CreateObject("SetupData")
   
    Me.txtCompanyName.Text = sdoCompany.Fields("NAME")
    Me.txtVatNumber.Text = sdoCompany.Fields("VAT_REG_NUMBER")
   
    ‘ Disconnect
    WS.Disconnect
Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: