I have a C # console application "App1" that reads a row of data from a table in a SQL Server 2005 database. I want App1 to pass all the data in that row to App2, another C # console application. What is the best way to do this?
My first (naive) attempt was to do this:
object[] o = myrow.ItemArray;
This has some drawbacks: what if one of the entries in the line was "my var" instead of "myVar"? In addition, the order of the elements will be hard-coded in the receiving application (App2).
So what's the best way to do this? Would it be appropriate to pass the xml string to App2 through the command line?
Hooray!