Hi friends,
I face a problem with sql query in vb 6. I took some data from MSAcess database using the sql query which is mentioned below:
Set rs1 = db.OpenRecordse t("select sum(foodprice * quatity) from sale where date1 = " & "'" & txtdate.Text & "'")
its gives Run time error no 3464 Data type mismatch cretira expression
if i write this query like
Set rs1 = db.OpenRecordse t("select sum(foodprice * quatity) from sale where date1 = " & txtdate.Text )
Run time error '94' invalid use of null
please help me about this problem.
In MS Acess Database i use the date1 filed with the short date like(MM/DD/YYYY)
Thnx in Advance
I face a problem with sql query in vb 6. I took some data from MSAcess database using the sql query which is mentioned below:
Set rs1 = db.OpenRecordse t("select sum(foodprice * quatity) from sale where date1 = " & "'" & txtdate.Text & "'")
its gives Run time error no 3464 Data type mismatch cretira expression
if i write this query like
Set rs1 = db.OpenRecordse t("select sum(foodprice * quatity) from sale where date1 = " & txtdate.Text )
Run time error '94' invalid use of null
please help me about this problem.
In MS Acess Database i use the date1 filed with the short date like(MM/DD/YYYY)
Thnx in Advance
Comment