jwcolby
jwcolby at colbyconsulting.com
Fri Feb 19 13:28:09 CST 2010
I have written a C# fixed width file export for a specific purpose, exporting name / address orders for a client. The data comes from a specific view of a SQL Server order database. I need to insert a small set of additional "seed names" in the result set. For technical reasons I really want to do this as I am writing the file to disk. IOW it would be good if I could pull the order names into a data reader, union the seed names, sort on zip and write the data reader out to disk (fixed width file). The fixed width writer code is written and functions just fine but ATM I am doing a klugy merge back in the database to get the seed names in before the writer ever gets the list of names to write. So... I know that supposedly .Net and SQL Server is all about disconnected recordsets and all of that. How would I go about pulling two datasets with the exact same fields (order and seed names) and then union them in memory before writing that union to file? Any ideas? -- John W. Colby www.ColbyConsulting.com