S
Shaine Fisher
I have had a look around but I'm either not finding or not seeing the
answer to this, what i want to do is reurn the results as an array, or
some other worldly useful format that flash mx2004 can read. But when
I did thiss I was told datasets were the way to go, but needs an
array, prefer typed as were changing it.
Here is the current code: (shortened for readability)
[WebService(Namespace = "http://microsoft.com/webservices/", Name =
"Sample", Description = "Sample")]
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:\\db\\database.mdb";
OleDbDataAdapter da = new OleDbDataAdapter(sqlQuery,
oleConn1);
DataSet ds = new DataSet();
da.Fill(ds);
return ds;
//as you see, I set up and return the dataset, but I either
want to change the way this is built, so it just creates the array
here, or I want a way to convert this dataset, to a typed array. Even
field by field is acceptable at this point.
}
[WebMethod (Description="Gets a list as a dataset")]
public DataSet getOrderData(){
return getDataStreams("SELECT * from table1");
}
}
I don't want someone to do this for me, just point me in the right
direction, unless it's just a couple of lines, then please help. make
it a little quicker.
Any help appreciated.
Reagrds
Shaine
answer to this, what i want to do is reurn the results as an array, or
some other worldly useful format that flash mx2004 can read. But when
I did thiss I was told datasets were the way to go, but needs an
array, prefer typed as were changing it.
Here is the current code: (shortened for readability)
[WebService(Namespace = "http://microsoft.com/webservices/", Name =
"Sample", Description = "Sample")]
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:\\db\\database.mdb";
OleDbDataAdapter da = new OleDbDataAdapter(sqlQuery,
oleConn1);
DataSet ds = new DataSet();
da.Fill(ds);
return ds;
//as you see, I set up and return the dataset, but I either
want to change the way this is built, so it just creates the array
here, or I want a way to convert this dataset, to a typed array. Even
field by field is acceptable at this point.
}
[WebMethod (Description="Gets a list as a dataset")]
public DataSet getOrderData(){
return getDataStreams("SELECT * from table1");
}
}
I don't want someone to do this for me, just point me in the right
direction, unless it's just a couple of lines, then please help. make
it a little quicker.
Any help appreciated.
Reagrds
Shaine