15,993,725 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Varinder Raii (Top 20 by date)
Varinder Raii
18-Jul-16 2:48am
View
Thanks for your reply. I think you didn't see my question. I am doing in same way. But getting transaction related issue.
Varinder Raii
29-Nov-12 23:13pm
View
@OriginalGriff Thanks.....
Varinder Raii
12-Jul-12 4:22am
View
Sorry, I didn't get you, can you please elaborate.
Varinder Raii
9-Jun-12 5:41am
View
Actually i want to make a common method for master forms
which will retrieve data from database for all master forms. but problem is that
when reader retrieve data then how can i add this data to list.
For Ex.
Collapse | Copy Code
public static List<object> Retrieve(string TableName)
{
List<object> List = null;
using (var con = ClsCommon.ConnectionOpen())
{
using (var transaction = con.BeginTransaction())
{
string Qry = "Select * from "+TableName +"";
SqlCommand command = new SqlCommand(Qry ,con );
SqlDataReader Reader = command.ExecuteReader ();
if (Reader.HasRows )
{
while (Reader.Read ())
{
// Now here how can i add values from reader to List
}
}
}
}
return null;
}
I want to make a common method. is there any way for this problem. using Genric Class or any other thing.
Please help me i will be very thankful to you guys.
Varinder Raii
9-Jun-12 5:36am
View
Deleted
Actually i want to make a common method for master forms
which will retrieve data from database for all master forms. but problem is that
when reader retrieve data then how can i add this data to list.
For Ex.
public static List<object> Retrieve(string TableName)
{
List<object> List = null;
using (var con = ClsCommon.ConnectionOpen())
{
using (var transaction = con.BeginTransaction())
{
string Qry = "Select * from "+TableName +"";
SqlCommand command = new SqlCommand(Qry ,con );
SqlDataReader Reader = command.ExecuteReader ();
if (Reader.HasRows )
{
while (Reader.Read ())
{
// Now here how can i add values from reader to List
}
}
}
}
return null;
}
I want to make a common method. is there any way for this problem. using Genric Class or any other thing.
Please help me i will be very thankful to you guys.
Varinder Raii
9-Jun-12 2:35am
View
Here reader is SqlReader
Varinder Raii
5-May-12 7:14am
View
From such example i have gone so many times.
Let me ask my question to you.
I have to Retrieve some values from table then on the basis of this i have to insert some values in some table and then i have to retrieve value from this table. Now after retrieving i have to bind it with datagridview, then i have to set appearance of columns like, some values bold,some right side etc. tell me how should i do it. how should i can increment progrsssbar.
Varinder Raii
3-May-12 0:57am
View
i mean to say is there any command in which i just type name of table and execute it and it gives me create new table Query. I want this because when database has lot of tables then it took lot of time to find table.
Varinder Raii
3-May-12 0:57am
View
i mean to say is there any command in which i just type name of table and execute it and it gives me create new table Query. I want this because when database has lot of tables then it took lot of time to find table.
Varinder Raii
31-Mar-12 7:16am
View
sorry, I didn't get ??
Varinder Raii
31-Mar-12 4:17am
View
Sorry i was frustrated with this problem thats why i not got what you say.
Thanks For your Reply
Varinder Raii
30-Mar-12 11:36am
View
If i remove RawPrinter stuff then how i will send document to printer
Varinder Raii
2-Mar-12 7:02am
View
where is web.config.page. in Windows Application
Varinder Raii
16-Feb-12 6:11am
View
how to use itextSharp any example
Varinder Raii
15-Feb-12 8:15am
View
i want this in UPDATE QUERY
Varinder Raii
11-Feb-12 9:25am
View
Thanku, Thanku, Thanku
Varinder Raii
11-Feb-12 9:25am
View
Thanku, Thanku, Thanku
Varinder Raii
11-Feb-12 9:08am
View
Now it is showing 'Incorrect syntax near *'
Varinder Raii
11-Feb-12 9:07am
View
Now it is showing
'Incorrect syntax near *'
Varinder Raii
5-Oct-11 2:07am
View
Actually I wants to Start and Stop its Working
Show More