16,016,580 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 kid218 (Top 3 by date)
kid218
19-Nov-10 4:48am
View
Thank you for your help :)
kid218
15-Oct-10 6:15am
View
While the app is running, you don't know codeOfClass which I will choose, there are a lot of codeofclass in your table.
kid218
15-Oct-10 5:32am
View
myConnect.open();
string myStringCommand = "SELECT ordinal, codeOfStu, fullName, ST.codeOfClass, CL.nameOfClass FROM Student ST, Class CL WHERE ST.codeOfClass = CL.codeOfClass AND ST.codeOfClass = @SelectedCodeOfClass";
OleDbCommand command = new OleDbCommand(myStringCommand, myConnect);
OleDbParameter myParameter = new OleDbParameter("@SelectedCodeOfClass", OleDbType.Integer);
myParameter.Value = SelectedCodeOfClass; // SelectedCodeOfClass is a parameter which is carried from main function.
myCommand.Parameters.Add(myParameter);
OleDbDataReader myReader = myCommand.ExecuteReader();
.
.
.
Now, I want not use "connect model" to access database anymore. I want use "disconnect model" to do that.
If I do like this:
OleDbDataAdapter adap=new OleDbDataAdapter("select * from tablename",con);
Dataset ds=new Dataset();
adap.fill(ds);
The Thing I receive is a datatable involve in all of the students. I don't want read all of the Student 's Information in database. I only want read students' Information according to class (codeOfClass) that they belong to