HighTechTalks DotNet Forums  

Loading a DataSet from an SQL Database

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss Loading a DataSet from an SQL Database in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Fred Nelson
 
Posts: n/a

Default Loading a DataSet from an SQL Database - 04-12-2004 , 01:39 PM






I have an applicatioin that I'm writing that uses a "case" file that
contains over 350 columns and more may be added in the future. I would like
to create a dataset with all the column names and only one case record that
is delivered by a stored procedure. (I have a stored procedure that works
so my question is only on loading the DataSet.)

The DataSet will only be used for printing form letters and then will be
zapped. I would like to do it this way rather than maintain a stored
procedure that returns 350 variables if possible so that I don't have to add
new code each time a column is added.

For example:

dim myDataSet as DataSet = New Dataset("MyCaseData")
dim myCaseTable as DataTable = New DataTable
dim my

dim caselib as new data.caselib
mycasetable = caselib.getonerec(case#) // returns an sql reader with one
record

So: I guess I'm asking how to define a data set and load data columns and
data from an SQL Data Reader

Then I would access the info by column name.

At the end of the process I would set the myDataSet = nothing

Any help or pointers to where to look to do this would be GREATLY
appreciated!

Thanks,

Fred




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.