3.2.0

Populating Grid

Hello

I have a question about populating an activewidget grid from data recevied from a websphere. I appologize in advance for I'm sure I'm doing something dumb but I'm rather new at this so please bear with me.

I created a websphere in vs.net 2003 which has a method called GetData which looks like this

public System.Data.DataSet GetData(string strQryName, string strWhere)

....code......

oAdapter.Fill(ds);
oleDbConnection1.Close();
return ds;

I have tested this and I know that it works the way I want it to. I wish to call this method via javascript and use the results to populate a grid.

Here's what I have so far:
<script language = "javascript">
var data = new Active.XML.Table;
var iCallID = 0;
function init()
{
service.useService("/DataFeeder.asmx?WSDL", "datafeed");
iCallID = service.datafeed.callService(myResults, "GetData", "qryClient", null);
}
function myResults(result)
{
if(result.error)
{
alert(result.errorDetail.string);
}
else
{
alert("Woot");
data.XML = result.value;
var obj = new Active.Controls.Grid;
obj.setDataModel(data);
document.write(obj);
}
}
</script>

Anyway it doesn't work. Could someone please tell me what I'm doing incorrectly, perhaps point me to a code sample that would be helpful. I tried a couple of different approaches using some of the example code in the \samples\grid folder and didn't have any luck there either.

Thank for your time
Alex
October 17,
oops web service not websphere
Alex
October 17,
Hello again

Well I've changed my web service to just return a string. Here's the new output

<?xml version="1.0" encoding="utf-8" ?>
<string xmlns="http://tempuri.org/"><NewDataSet> <Table> <Name>Severson, Franklin Paul</Name> <HomePhone>(608) 442-1234</HomePhone> <Sex>M</Sex> <Birthdate>06/11/2005</Birthdate> <Address>1442 Willy St Unit B Madison, WI 53704</Address> </Table> <Table> <Name>TheFifth, Louie </Name> <Sex>M</Sex> <Birthdate>06/22/1976</Birthdate> </Table> <Table> <Name>Luckland, Johnny Frank</Name> <Sex>M</Sex> <Birthdate>12/01/1960</Birthdate> <Address>1255 Lucas Webber Frank, WI 54773</Address> </Table> <Table> <Name>Spikes, Sylvia </Name> <Sex>F</Sex> <Birthdate>10/15/1950</Birthdate> <Address>1442 Willy St Unit B Madison, WI 53704</Address> </Table> </NewDataSet></string>

but I still can't get it to load. Does anyone have any suggestions? I'm about ready to start ripping my hair out. Help!

Thanks!
Brian
Alex
October 18,

This topic is archived.

See also:


Back to support forum