Using CS0120 to connect to read and write to a non-Sage 300 SQL database (Sage CRM)

I have this working with the Sage 300 company database but need to read from another SQL database.

Does anyone have some sample  code to get me started?

Any and All advice greatly appreciated,

Dana

Parents Reply
  • 0 in reply to Jay Converse Acumen

    Okay, I got it reading the CRM data but I now have an issue with the format of the variables for the date fields.  After the SQL read I use Fetch to assign the data to variables like below

    o While csTemp.Fetch = True

        mCRMSalesPerson = csTemp.Fields.FieldByName("Lead_AssignedUserID").Value
        mLeadDate = csTemp.Fields.FieldByName("Lead_CreatedDate").Value
        mSoldDate = csTemp.Fields.FieldByName("lead_companysolddate").Value
        mSource = csTemp.Fields.FieldByName("lead_companysource").Value

    I have mLeadDate and mSoldDate dimensioned as 'Date'.  This doesn't work.  I thought I'd try Dim as String but that doesn't work either. 

    What should I be using?

Children
No Data