manared
Well-known member
- Joined
- Jun 1, 2006
- Messages
- 84
- Programming Experience
- 1-3
I am using vb.net 2005 and have created a windows form. I have a database with entries and I want to cycle through every entry in the database. My SQL statement has 3 different filters on it, but if one matches, I want to put it in the dataset. SQL statment:
If another matches, I want to add a row to the dataset. How do I go about doing this? After the dataset is full, or there are no more entries in the database that match the criteria, I want to read the database and for every entry, do an action (send an email).
I'm not exactly sure how to start doing this because of the new version. I don't know if I should hard code or if I can do it through the gooey tools. Any ideas as to what is the best way to do this and how to do it? Thank you!
VB.NET:
Dim strSQL As String = "SELECT * FROM FreeSchedule WHERE (schedule_event_date <= '" & lblDate.Text & "') AND (schedule_central_time <= '" & lblTime.Text & "') AND (schedule_reminder_ampm = '" & lblampm.Text & "')"
I'm not exactly sure how to start doing this because of the new version. I don't know if I should hard code or if I can do it through the gooey tools. Any ideas as to what is the best way to do this and how to do it? Thank you!