"Shaine Fisher" <sh**********@hotmail.com> wrote in message
news:3b**************************@posting.google.c om...
I think you can still use a data set, as I believe that flash will
allow
you to process XML.
Oops I misread that.. sorry, your right flash will allow me to use xml, I
just wanted to get a webservice running properly.
We had a great system, the webservice sent us the info, and we sent data
back and could update the database, and alter the dataset and reload it with
filtered results.
This is why I wanted to keep the dataset and process it into an array, so
all of the filtering and sorting could be done on the dataset and then it
would be converted to an array, for sending back to flash. I get the best of
all worlds. There is not filtering going on in this webservice yet, but
there is in others, and they must be converted too, but I need a solution to
this small problem so I can continue onwards with this project.
But, I have *a* solution, just not the one I wanted to hear. Although I may
not have explained things very well.
I'm going to give it one more try:
Here is the full code: BTW I am using the express tools from MS and after
i've figuired out if it's worth it, I am looking at buying vs.net, though I
may wait until the new version comes out before I do that. I am actually a
ColdFusion person normally.
<%@ WebService Language="C#" Class="WebService1" %>
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.Data.OleDb;
[WebService(Namespace = "http://microsoft.com/webservices/", Name = "None",
Description = "None")]
public class WebService1{
public WebService1(){
}
private DataSet getDataStreams(string sqlQuery)
{
System.Data.OleDb.OleDbConnection oleConn1 = new
System.Data.OleDb.OleDbConnection();
oleConn1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=D:\\database.mdb";
OleDbDataAdapter da = new OleDbDataAdapter(sqlQuery, oleConn1);
DataSet ds = new DataSet();
da.Fill(ds);
return ds;
}
[WebMethod (Description="...method1")]
public DataSet getOrderData(){
return getDataStreams("SELECT field1, field2, ... , field48 from
table1");
}
[WebMethod (Description="...method2")]
public DataSet getSOrderData(string passedvar){
return getDataStreams("SELECT field1, field2, ... , field48 from
table1 WHERE table1.var1='" + passedvar + "'");
}
[WebMethod (Description="...method3")]
public DataSet getMemberData(int passedvar2)
{
return getDataStreams("SELECT field1, field2, ... , field48 from
table1 WHERE table1.var1=" + passedvar2);
}
}
So that's it.... We have 3 methods for getting data from the database, each
one uses the same code to return a dataset. I would like to take that
dataset and turn it into something else, in this case it has to be an array,
so I can load it into the webservice connector in flash mx2004.
I cannot find code, or tutorials anywhere on how to take this dataset and
iterate through it passing the values to an array, hopefully strict typing
them on the way.
Please look at this code, and see if you can understand what I am trying to
do, I have had some great feedback, but I hope this explanation is slightly
clearer