|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Wed Jan 27, 2010 11:27 pm
[3.12] Local variables crashing %sql |
Open a blank session, make an alias 'find'. Connect to your database, I use a sqlite database. In alias, enter this:
$input=%trim(%lower(%-1))
row = %sql(databasename, %concat("SELECT * FROM Mobs WHERE Name LIKE","'%",$input,"%'"))
#loop 10 { #SHOW "Title: " @row.Item("Name")
#CALL @row.Next }
Then change row to a local variable, run it and you crash. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Jan 27, 2010 11:48 pm |
Please post questions or problems about the 3.12 BETA version to the CMUD BETA Forum. The General forum is only for the Public versions.
To answer your question, there is a known bug with using the = syntax to assign a COM variable (like the result of %sql) to variables that is causing this problem. Should be fixed in the next version. |
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Thu Jan 28, 2010 2:06 am |
The bug isn't with using = to assign variables, what I put up works fine as it is. The issue was if you want to use local variables it crashes. If local variables aren't meant nor ever will be designed to support a com object, then so be it. I don't know otherwise so I put it up.
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|