FCI-Helwan blog

Just another FCI-H weblog

How to use dataset and adapters with stored procedures?

Q: How to use dataset and adapters with stored procedures?

A: I’ve asked this question two times today, and for that I thought to do a post and send the link better to answer everyone separately..

Right now, I’ve be_settings table, its schema (SettingName nvarchar(50) and SettingValue nvarchar(MAX)) what I need is to create stored procedure to get SettingName and SettingValue when the SettingValue = some value


then let’s go to Visual Studio and create windows application and drop DataGridView on the form; press on the smart arow located on its top right, new dialog appears, choose to add new data source->Add project data source->Database




then finish…

Your form should look like

after choosing datasource

in Load data onClick event handler, write this code

code to load data

Just, Ctr + F5 and lets test our work


Hope, I answered your question ",)

Tip: if you using Windows Vista you need to run Visual Studio and SQL Server as administrator….


August 15, 2008 - Posted by | .NET Q and A

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: