TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sachi vasishta
NA
252
0
storing db field values into an string array
Jun 4 2009 3:49 AM
Hi,
I will retrive some field values from two db tables as shown in the below query and I want to store them in a string array. How can I store the selected field values
string sql = string.Format("select scheduleappointment.patientid as Patient_Id,firstname as FirstName,lastname as LastName,phonemobile as Mobile_Phone,phonehome as Home_Phone,scheduledate as Date,starttime as StartTime,endtime as EndTime,provider as Doctor,reason as Reason,priority as Priority,sex as Sex,address as Address,city as City,statecode as State,scheduleid as SId from patientinfo,scheduleappointment where scheduledate='{0}' and scheduleappointment.patientid=patientinfo.patientid order by starttime", mysqldate);
Assume that the above query retrieves 6 tuples(rows) then how shall I store these field values in a string array. And after that baesd on starttime I am going to insert a new row for the dgv if it matches with the value in the if condition else I will insert a empty row for that time slot(It is similar to my post on "how to insert cells to dgv statically"). Can anyone help me to accomplish this with code
thanks
Reply
Answers (
0
)
dotnet tutorial
Bind multidimentional array to datagridview control