last day (15 days later) » 

4:33 PM
0
A: How to insert multiple rows record in multiple columns of single row in datagridview

Rahul SinghTry this:- select rollno,name,fname,[8],[9],[28] FROM ( select rollno,name,fname, DATEPART(d,[date]) enterdate,attandance from students )first PIVOT ( MAX(attandance) FOR [enterdate] IN ([8],[9],[28]) ) as pivottable This is giving me following output:- You can then display ...

 
but what about the whole month?
as attendance will be marked every day.
 
@Loyal - Then obviously SQL Pivot is not a good option! You didn't mentioned that in your question. For a whole month, don't you think your grid will be too large?
 
yeah it will be large but actually i want to display the whole month attendance record of the specific class.
Can we do it programatically?
 
@Loyal - Lets discuss this over chat!
@Loyal - If you'll hardcode the values from 1-30 instead of (8,9,28) what i have used, you will get your desired output, But thats a good way.
 
@ Rahul how to chat over stackoverflow, i don't know.
But the days in a month also varies from month to month. then what should we do for that?
 
4:35 PM
So buddy what I am saying is you can achieve this by PIVOT also but that's not the best way
Yes that is another problem
 
thanks for your time and reply. will sort out some other options.
ok bro. if you don't mind can i ask another question?
i have one other problem too.
 
sure
tell me
 
actually i am developing a school management system synchronizer. it is my Final year project, so i can not establish connection with online mysql database.
how to connect my desktop application with online mysql database?
for testing purpose i have created account in free hosting site.
 
I am really not sure about this
 
ok thanks buddy. it was really pleasure to chat with you.
once again thanks.
good night.
 
4:45 PM
same here
thank you
Gn
 

last day (15 days later) »