How do I get multiple records from a SQL stored procedure?

Hello Ignition Gurus,

Using Microsoft SQL Server and Ignition here. Works awesome except that I have run into a slight (well big) problem.....

I'm trying to get multiple records/datasets from a stored procedure but it seems like I only get the first record/dataset no matter what I do. I am using the following to execute the stored procedure (okay, I changed the names)

call = system.db.createSProcCall("Data.spMyStoredProcedure","ProductionDatabase")

then I just use this to get the result

returns a dataset called results

results = call.getResultSet()

and then I write using something like this

system.tag.write("[default]Machine1/Dataset", results)

Problem is that I only get the first Dataset [1R x 22C] and not the subsequent records Dataset [1R x 8C], Dataset [1R x 8C], Dataset [1R x 8C], etc.

Yes, I've tried making a results, results1, results2 etc. but I can't seem to get past the first record/dataset. Help.

In the Vbscript world, I used the following

Set rs = rs.NextRecordset

and then indexed there something similar that I can do in Ignition? I've seen some similar questions in the forum so I apologize if this has been asked before.


Not possible. I have client that suffers similarly.

I've thought of re-implementing this in a module to make it possible, but way down my to-do list.

Yikes!!!! Wow, thanks Phil for your super quick response. Much, much appreciated.

Possible solution: I suppose that I can rewrite the stored procedure into multiple stored procedures, each with some key component of the dataset.....only thing that I can think of right now. So call stored procedure1 then call stored procedure2 etc.

Total bummer. I'm not a drinker but this one makes me want to cry in my beer....