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
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
So would this work?
SELECT SomeField, SomeOtherField FROM CRM.dbo.Lead
or do I have to specify the server name too? It is the same server
Dana
Perfect! If it's on the same server, just fully qualify the reference.
This is part of my code. It's not working
What have I missed?
Dim SQLStr As String
Dim csTemp As AccpacCOMAPI.AccpacView
Set mComLink = OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)
mComLink.OpenView "CS0120", csTemp
SQLStr = "SELECT Comp_IdCust, Comp_Name, Comp_Status FROM CRM.Company WHERE Comp_Status = Active ORDER BY Comp_IdCust"
csTemp.Browse SQLStr, True '<<< Fails on this line - Method 'Browse' of object 'IAccpavView' failed
csTemp.InternalSet (256)
This is part of my code. It's not working
What have I missed?
Dim SQLStr As String
Dim csTemp As AccpacCOMAPI.AccpacView
Set mComLink = OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)
mComLink.OpenView "CS0120", csTemp
SQLStr = "SELECT Comp_IdCust, Comp_Name, Comp_Status FROM CRM.Company WHERE Comp_Status = Active ORDER BY Comp_IdCust"
csTemp.Browse SQLStr, True '<<< Fails on this line - Method 'Browse' of object 'IAccpavView' failed
csTemp.InternalSet (256)
A period between CRM and Company. You can use two periods instead of .dbo.
SELECT Comp_IdCust, Comp_Name, Comp_Status FROM CRM..Company WHERE Comp_Status = Active ORDER BY Comp_IdCust
*Community Hub is the new name for Sage City