We help IT Professionals succeed at work.

Where can I find a repository of SAGE 100 Scripts which can run .vbs using ODBC

Tek Info
Tek Info asked
Where can I find a repository of SAGE 100 scripts which can run in .vbs using ODBC?
Watch Question

Scott FellDeveloper & EE Moderator
Most Valuable Expert 2013

I think what you want to check out are the API's https://developer.columbus.sage.com/docs/services/api/global if that is what you are after.  From there Experts can help with a specific api assuming you have some experience with  with vbs.  In short, most API's are either going to be REST or SOAP. Either way, you can send POST and GET requests using  xmlhttpost. The best way to get help is work on something very specific. If you are just starting out, your starting point may just be getting an access token.  Once you have that, you can create a new question for the next step.


Thanks Scott.
I checked however it does not seem what I am looking for...
I use SAGE 100 and I am simply looking for sample .vbs script which can be used with OBDC so that I can extract data our of SAGE and perhaps form a CSV file of the several fields etc.
I need somewhere to start
Developer & EE Moderator
Most Valuable Expert 2013
It looks like this is 3 parts.  First is creating the connection. I am not a sage user, but I found some helpful info

Getting the first part done may be worth it's own question and probably going to be the biggest hurdle.

The 2nd part is figuring out the correct connection string https://www.sagecity.com/support_communities/sage100_erp/f/sage-100-technical-and-installation-discussions/39104/odbc-connection-string with the possible solution
strConnectionString = "DSN=J_SOTAMAS90;UID=xxx|ABC;PWD=xxxx;Directory=C:\Sage Software\Clean\MAS90;LogFile=\PVXODBC.LOG;DirtyReads=1;BurstMode=1;StripTrailingSpaces=1;SERVER=NotTh

Open in new window

The third part is coding the script. Once the first two parts are figured out, this is just a matter of knowing the fields you want to access.

<%  Option Explicit %>  
<!--#include File="adovbs.inc"-->  
    <BODY BGCOLOR="White" topmargin="10" leftmargin="10">  
    <!-- Your ASP Code goes here -->  
Dim Source  
Dim Connect  
Dim Rs1  
Source = "SELECT * FROM Authors"  
Connect = "Provider=sqloledb;Data Source=srv;" & _  
    "Initial Catalog=Pubs;Integrated Security=SSPI;"  
Set Rs1 = Server.CreateObject( "ADODB.Recordset" )  
Rs1.Open Source, Connect, adOpenForwardOnly  

Open in new window

This example shows rendering an ASP page but you can of course leave out the html.  Where the example shows
Connect = "Provider=sqloledb;Data Source=srv;" & _  
    "Initial Catalog=Pubs;Integrated Security=SSPI;"  

Open in new window

That will be the connection string from step 2.

I hope this at least helps you get started.  I am sorry I can't be more detailed as I do not have a copy of Sage to play with.  Just take it one step at a time.


Perhaps this might be helpful, I have not tested it.