Below is VB Script code used to connect to The Raiser's Edge and return a count of the constituent records

Option Explicit



<job id="DoneInVBS">

<?job debug="true"?>

<script language="VBScript">

WScript.Echo "This is VBScript"


const DBNumber=50

const amServer=1 'This makes the API be in non-interactive mode. You must supply user name/password


set REAPI=createobject("reapi7.reapi")

REAPI.Init "wre1111","Supervisor","admin",50,"",amServer


dim oSessionContext

set oSessionContext=reapi.SessionContext


dim oRecords

set orecords = createobject("constitdata7.crecords")

orecords.Init (oSessionContext) 'Need parens to pass byvalue


msgbox oRecords.Count




Blackbaud's Product Support can only provide examples in Visual Basic 6 Programing language. The information here is for information use only and Blackbaud support will not be able to provide additional information on this code or other C# programming questions.

Disclaimer: We provide programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Microsoft Visual Basic and the tools used to create and debug procedures. Our Customer Support can help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality. If you are interested in learning more about the VBA and API modules, contact your account manager.