Click here to Skip to main content
15,123,727 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am going to start one small application.

I want to assign my connection and reader in one class file instead of using in inlne code.

Also, i don't want to call everytime connection and reader.

I want to maintain one class file. In that, whenever i want the connection or reader just i want call that function and execute the Stored rocedure's.

pls. give me one example with one small stored procedure with select/insert/delete using class file for connection and reader.


1 solution

First you have to create a helper class with the CRUD operation methods and that should implement the ADO.NET coding and get the connectingstring from config file.
Call the appropriate method for your operation and as well as handle the return type
Have a look on[^]
You will get an idea.
gani7787 27-Aug-12 5:56am
can you give more example on this...?
Prabhakaran Soundarapandian 27-Aug-12 6:05am
Find this with Code..
and you can find the sample for above code in

and also the below link will have same

If you find this as useful rate it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900