This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Returning sql results in javascript?

jenC - Friday, March 21, 2008 3:31 PM:

I know I can't make SQL calls in a javascript method, so I usually resolve this by writing a VB method that returns the sql result to the javascript function.  This works fine if I'm just returning a single field (using the getResult() function from the returned item).

But I now need to return several rows of data to the javascript method and I can't figure out how to do it... the only thing I can think of is to put the sql result string in innovator.newResult() but then I would have to parse it by hand back in javascript... or is there a way to load that XML into an item?

I'm sure this has been done before... I'm just stuck with how to do it. Any help would be appreciated.

Thanks

Jen



jenC - Friday, March 21, 2008 5:06 PM:

Disregard. I realized I could just return the whole item returned from applySQL and parse through it as a normal item in javascript - no need to return a result. It's nice when the easy thing works :)

 



vishal_trivedi - Monday, January 3, 2011 4:12 PM:

Hi jen,

It will be really helpful for me if you can provide me some steps that how did you perform it?

Vishal