Correction:

Changing the variable name was not the solution. The following is:

Go to the terminal.
Type:

Set result = ##class(%Library.ResultSet).%New()
Do result.Prepare("SELECT bla FROM table")
Do result.Execute()
Write Result.Next()

Now execute the MAC routine and it works...what is going on here?

Yours,
Rogier


"Rogier Schouten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I found a strange bug:
>
> I have a class containing a method like this:
>
> Method MyMethod(){
>     Set SQL = "SELECT bla FROM table"
>     Set result = ##class(%Library.ResultSet).%New()
>     Do result.Prepare(SQL)
>     Do result.Execute()
>
>     ... etc etc
> }
>
>
> When I call this method from a MAC routine, everything works. Now when I
> export the project to an XML file, import it into another namespace, and
> call the MAC routine again, the method fails with error:
>
> <NOROUTINE>zSQLExecute+2^%ooLibrary.DynamicQuery.1
>
> After a long time, I tried changing the variable name SQL into MySQL, and
> hey presto, it works!
>
> How is this possible? I'm very curious because I would like to prevent
these
> kind of errors in the future.
>
> Regards,
> -- 
> Rogier Schouten
>
> Developer
> Technische Universiteit Eindhoven
> Bibliotheekautomatisering
> De Hal 1.16
> Postbus 90159
> 5600MB Eindhoven
> Phone +31402473907
> E-mail [EMAIL PROTECTED]
>
>



Reply via email to