Click here to Skip to main content
15,907,001 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is it possible to print multiple student data. I have 50 members to print, but i want to print 30 of them simultaneously. print first 10, then next another 10, then another 10.. if so, please tell me how... thanks...


or can I have a function that prints all members except this 5 members..??


please help me... thanks :)
Posted
Comments
Dr.Walt Fair, PE 22-Nov-10 22:31pm    
Obviously printing student data is possible, but you haven't provided enough information to know what it is you are having trouble with.

Wat have you tried? How are you getting the data? What is your code doing that isn't right?
Ed Guzman 22-Nov-10 23:15pm    
Why not printing first 5, then 15, then 10? or maybe different order? :-)

1 solution

Using SQL query you can use NOT IN or EXISTS/NOT EXISTS in your SELECT query.

Ex.
SQL
SELECT * FROM [tblStudent] WHERE StudentID NOT IN (1,2,3,4,5)
SELECT * FROM [tblResult] WHERE StudentID EXISTS (SELECT * FROM tblStudent WHERE Result='PASS')

In C#, you can use String.Contains method with array
C#
string[] fruits = {"apple", "banana", "mango", "orange", "cherry", "grape"};
string fruit = "mango";
bool hasMango = fruits.Contains(fruit);

Also you can use loops to check the existence of values.
 
Share this answer
 

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