Runtime Error when running robot scripts
I'm a fairly new Robot user and when I try to call my functions I get a error message that states "Runtime error 906 External procedure interface mismatch" According theie site it should be solved by simply choosing compile all instead of just compile yet that doesn't work. Does anyone have any idea of what to try next.
I have placed the declaration in the glogal.sbh as seen below
Declare Function PatientSearch BasicLib "PatientSearch" Alias "PatientSearch" (LastName As String, FirstName As String) As Integer
Then I have the actual function in a .rec file.
Thanks for any help
Re: Runtime Error when running robot scripts
If the function is in the same script(.rec file) as the on you're working on, there's no need to put the declaration in the header file (.sbh).
However, if you're using the same exact function across multiple scripts, it should be stored and compiled in a library file (.sbl).
To create one, go to the File menu and follow this path: File->New->SQABasic File
When the "New SQABasic File" window pops up, select "Library Source File" and click the "OK" button.
Put your function in that file and save it. For the sake of this example, let's call it "FuncLibrary.sbl". Compile the Library file. When declaring it in the Header file (in your case "glogal.sbh"... is that a typo?), enter the following:
Declare Function PatientSearch basiclib "FuncLibrary" (LastName As String, FirstName As String) As Integer
It should work now. Anytime you make a change in the Library file, you'll need to compile it, otherwise, your changes won't work.
Hope this helps.