Question : Datatype mismatch error in sql code

Hello all,
Can any one point out the type mismatch error in the following sql code.

Dim mynumber As Integer
        Dim con As OleDbConnection
        Dim comm As OleDbCommand
        Dim first, second, third, fourth As String
' The following will count the Number of As given to the four questions
        first = "Select count(Response)from Response where SurveyID = '" & Me.lblSurveyID.Text & "' and QuestionID =1 and Response = 'A'"
        second = "Select count(Response)from Response where SurveyID = '" & Me.lblSurveyID.Text & "' and QuestionID =2 and Response = 'A'"
        third = "Select count(Response)from Response where SurveyID = '" & Me.lblSurveyID.Text & "' and QuestionID =3 and Response = 'A'"
        fourth = "Select count(Response)from Response where SurveyID = '" & Me.lblSurveyID.Text & "' and QuestionID =4 and Response = 'A'"
        comm = New OleDbCommand(first, con)
        'comm = New OleDbCommand("Select count(Response)from Answers where SurveyID = 1 and QuestionID =1 and Response = 'A'", con)
        ' Open Connection
        con.Open()
        ' execute comm
        mynumber = comm.ExecuteScalar
        con.Close()

Answer : Datatype mismatch error in sql code

as SurveyID is numerical, don't put quotes:
1:
2:
        first = "Select count(Response)from Response where SurveyID = " & Me.lblSurveyID.Text & " and QuestionID =1 and Response = 'A'"
Random Solutions  
 
programming4us programming4us