I am trying a little dll test.

I created the following the following function within a dll in VB.Net
Public Function GetCompanyNameByCustomerID(ByVal CustomerID As Integer) As 
String
        'Return a company name when given a customer ID
        Dim SQLString As String = "SELECT CompanyName " & _
        "FROM Contacts " & _
        "WHERE ContactID = " & CustomerID & ""

        Dim sCompanyName As String = GetString(SQLString)

        Return sCompanyName
    End Function


I created a form on a local copy of RBASE.  It has a VariableEdit box, a push 
button, and a VariableLabel control.

I have the dll located in the same directory as the DB and the form.

This is my ON BEFORE START EEP
SET VAR vCustomerID INTEGER = NULL
SET VAR vCustomerName TEXT = NULL

This is my push button Click EEP
CLEAR VAR vCustomerName
STDCALL function 'GetCompanyNameByCustomerID' (integer) : text
SET VAR vCustomerName = 
(dlcall('RBASE_DLL_TEST.dll','GetCompanyNameByCustomerID',vCustomerID))
lblCompanyName = .vCustomerName
RETURN

My error states.

Unable to locate GetCompanyNameByCustomerID function. (3204)

This is a DOS based version of RBASE and I am using Windows 7.6 to try this.

Any help would be appreciated.

Thanks, Mike


Reply via email to