Earl,
In that case assuming that BirthdaysDataset is not the class but the
instanced dataset is is something like this strongly typed.
for each row as BirthdaysDataSet.MemberRow in BirthdaysDataSet.Member
if row.Birthdate.month = now.month then
code
end if
end for
Non strongly typed
for each row in BirthDaysDataSet.Tables("Member").Rows
if DirectCast(row("Birthdate"),DateTime).Month = now.month then
code
end if
end for
"Earl Partridge" <
[email protected]> schreef in bericht
Where I'm having trouble appears to be in the syntax. In your example...
if person.birthday.month = now.month then
Is person the table name or field name?
Not wanting or expecting anyone to write my code, but perhaps if I provide a
sample
of my database, you might be better able to point me correctly.
DB Name Birthdays (In project as "BirthdaysDataSet")
Table Name: Member
Field Names: MName, Birthdate
Then using your example would I...
for each Member in Birthdays
if Member.Birthdate.month = now.month then
code
end if
end for
Earl
Earl,
Or in VB something as
\\\
dim ar as new arraylist
for each person in persons
if person.birthday.month = now.month then
arrayList.Add(person)
end if
end for
//
Cor
"Earl Partridge" <
[email protected]> schreef in bericht
I just downloaded this VB Express. I need a little help in understanding
the request
for database data, that is the format/syntax compared to an SQL statement.
In my SQL I would use a select statement... example
select LastName from Members where month(Birthday) = month(now)
How would this be coded in VB Express?
Earl