adamtrask
asked on
Trying to count the number of records where date column = 2010
Hello,
Now I am trying to count the number of records where the date column (dDate) contains 2010.
The error I am getting is a "clash" between date and integer.
I am used the following select count statement as listed below:
Now I am trying to count the number of records where the date column (dDate) contains 2010.
The error I am getting is a "clash" between date and integer.
I am used the following select count statement as listed below:
mySqlcommand = New Sqlcoomand("Select count(*) where dDate = @dDate",con)
comm.Parameters.AddWithValue("@dDate", System.Data.SqlDbType.Date)
comm.Parameters("@dDate").Value = curYear
Dim count As Integer
con.Open()
count = comm.ExecuteScalar
Me.txtMonthTests.Text = count.ToString
con.Close()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you all
ASKER