473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Web Method, datatable, but send as standard types, string array

Hi,

I'm building a simple "look up" web method that would return
a table with 9 columns and a dynamic number of rows,
then I find out datatables cannot be serialized.
Not a big deal the .Net 1.1 client works with dataset.
But it got me thinking that I might as well deliver this in
a neutral format, since it's such a terribly simple return set I figured
use standard types and that would mean a 2 dimensional
string array. (rather than a Custom type such as Array of objects)

How to do this?

--
"it's definitely useless and maybe harmful".
Aug 24 '07 #1
2 1618
"John Sitka" <jo*******@REMOVEhotmail.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi,

I'm building a simple "look up" web method that would return
a table with 9 columns and a dynamic number of rows,
then I find out datatables cannot be serialized.
Not a big deal the .Net 1.1 client works with dataset.
But it got me thinking that I might as well deliver this in
a neutral format, since it's such a terribly simple return set I figured
use standard types and that would mean a 2 dimensional
string array. (rather than a Custom type such as Array of objects)

How to do this?
Just return an array of a struct that has all of your 9 columns. That is
perfectly platform-neutral.
--
John Saunders [MVP]

Aug 24 '07 #2
Thanks
>That is perfectly platform-neutral.
I've read some of your critique about the ultimate goal of a service
Agnostic and durable, and the "training wheels" of VS.NET.
Would you have a wdsl signature of such an struct array,
or point me to a web service that does.

"John Saunders [MVP]" <john.saunders at trizetto.comwrote in message news:ut*************@TK2MSFTNGP06.phx.gbl...
"John Sitka" <jo*******@REMOVEhotmail.comwrote in message news:%2****************@TK2MSFTNGP02.phx.gbl...
>Hi,

I'm building a simple "look up" web method that would return
a table with 9 columns and a dynamic number of rows,
then I find out datatables cannot be serialized.
Not a big deal the .Net 1.1 client works with dataset.
But it got me thinking that I might as well deliver this in
a neutral format, since it's such a terribly simple return set I figured
use standard types and that would mean a 2 dimensional
string array. (rather than a Custom type such as Array of objects)

How to do this?

Just return an array of a struct that has all of your 9 columns. That is perfectly platform-neutral.
--
John Saunders [MVP]

Aug 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bartas | last post by:
Hi, I'am writting a simple SOAP client in python (2.4) using SOAPpy lib. I've met with this problem: when I want to send a list of complex type using some method from WebService(java,WAS), ...
4
by: mrgr8avill | last post by:
Hello, all. First off, I apologize for my ignorance. I am not used to working with non-variants, and it has been a LONG time since I dealt with OOP. I need to pass a string to a compiled...
1
by: Ryan McLean | last post by:
Hi everyone! What is happening is the method: sub_btnSubmitClicked is being executed every time any other object with a Handler is executed. I am trying not to use the withevents and handles...
0
by: Chris Ericoli | last post by:
Hi, I am working with an 'in session' ado dataset with an asp.net application. My dataset is comprised of two tables, one of which maintains a few calculated datacolumns. For some reason these...
18
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the...
4
by: MicroMoth | last post by:
Hi, I'm trying to write a update method, in which when the user clicks the update button the update method is passed 10 form fields. Then a update SQL is run to update the database. My question...
3
by: Niyazi | last post by:
Hi all, I have a dataTable that contains nearly 38400 rows. In the dataTable consist of 3 column. column 1 Name: MUHNO column 2 Name: HESNO Column 3 Name: BALANCE Let me give you some...
94
by: smnoff | last post by:
I have searched the internet for malloc and dynamic malloc; however, I still don't know or readily see what is general way to allocate memory to char * variable that I want to assign the substring...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.