Mike,

This is a shot in the dark.
7.6 only supports names of 18 characters or less.
Try shortening the name of your function.
Also I noticed that 
'Return a company name when given a customer ID
is missing a trailing quote.
I dont know if that is anything either.       

Jan
 


-----Original Message-----
From: Mike Casey <[email protected]>
To: [email protected] (RBASE-L Mailing List)
Date: Mon, 21 Dec 2009 09:32:02 -0600
Subject: [RBASE-L] - DLL Call


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