Custom DataTable - not from a database - possible?

Merrion

Well-known member
Joined
Sep 29, 2001
Messages
265
Location
Dublin, Ireland
User Rank
*Experts*
So - I want to expose the collection of print jobs (from the print queue) as a DataTable. Anyone have any experience (esp. code) I can draw on?
 
Maybe I misread here... but if I understand correctly, couldnt you just create a DataTable in memory and specify the columns, constraints, etc? Then you could just create and add DataRows to it which you also create in memory.

There are tons of mini-examples on the MSDN library. Heres what seems to be the central page for DataTable examples on the MSDN library;

http://msdn.microsoft.com/library/d...n-us/cpguide/html/cpconcreatingdatatables.asp

EDIT:
I think the topic threw me off. In any case, you can fill a custom DataRow with anything you want and then just insert it into a custom DataTable thats bound to a grid or whatever. However I believe the DataAdapter.Fill is for database stuff only, unless theres some way to retrieve the printer queue info with OleDb. The only thing I can think of is retrieving the printer queue info. as you normally would and then just using that info. to populate a custom DataTable thats in memory.
 
Back
Top