Nov 03, 2015; 17:31
Dave Bruhn
Odd inline bug?
I'm finding a really odd behavior in inline while running Lasso 9.2.7.
Here's some sample code:
local(arraystuff) = array
local(sqlquery) = "SELECT users from table1 where id=1;
SELECT id, name, room FROM table2 WHERE id > 100;
SELECT notes from table3 WHERE id=1;"
inline(-database='mydb', -sql=#sqlquery, -maxRecords='ALL') => {
resultSet(1) => {
local(users) = field('users')
}
resultSet(2) => {
records => {
#arraystuff->insert(field('id'))
}
}
resultSet(3) => {
local(notes) = field('notes')
}
}
Alas, what I end up with is that for #notes, I get the last "id" field from the second SELECT statement. Even if I comment out the #arraystuff->insert statement and have the records loop do nothing, it still puts the value for "id" into #notes.
If I move the resultSet(3) code to run before resultSet(2), everything is just fine.
Yes, yes, I know, use Ke's ds, but let's ignore that for now. I'd like to focus on inline, as I have other pages that do something similar.
Has anyone else seen this? Am I doing something wrong (besides using inlines)?
Thanks,
Dave
---
Dave Bruhn
Senior Systems Analyst
North Carolina Hospital Association
PO Box 4449
Cary, NC 27519-4449
919-677-4145 (office)
dbruhn@ncha.org
http://www.ncha.org
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso Lasso@lists.lassosoft.com
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>