Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stored Procudures to populate a DataSet
Message
From
05/11/2003 15:18:45
 
 
To
All
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Stored Procudures to populate a DataSet
Miscellaneous
Thread ID:
00846755
Message ID:
00846755
Views:
45
Hello,

I have an asp.net web form that uses ole db to retrieve data from a foxpro database ( vfp 7.0). The webform works great and below is some code from a function that return a DataSet.
// Creates connection and command string
String strConn, strCmd;
strConn = @"provider=VFPOLEDB.1 ;data source='C:\fnhodatatest\vips.DBC';password='';user id=''";
// Get the Producer code that was store on the Page_load event.
String strCurrentSession = Session["ProducerCode"].ToString();
strCmd = "SELECT controlnum,Ins1ln,Ins1fn,pxd FROM policy Where status=0 and ctrl3=1 and agent= '"+strCurrentSession + "'";
OleDbDataAdapter VFP7DataAdapter = new OleDbDataAdapter(strCmd,strConn);
DataSet VFP7DataSet = new DataSet();
VFP7DataAdapter.Fill(VFP7DataSet,"MyList");
return VFP7DataSet;
Here is my Stored procedure:
FUNCTION PT_GetQuote(tcControlNum)
	SELECT controlnum,pn,ins1fn,ins1ln FROM policy p WHERE p.controlnum==tcControlNum 
ENDFUN
I have the following question :

Can I use Stored procedures to fill a DataSet?

Thanks
Next
Reply
Map
View

Click here to load this message in the networking platform