Sql Command Using Variables ....a Roblem

Discuss ASP, ASP.net as it applies to web design, custom web apps, databases, search engine optimization or Mod Rewrite to make search engine friendly pages and more related matters.

Moderator: John55

Sql Command Using Variables ....a Roblem

Postby ramee001 » Sat May 02, 2009 12:43 pm

RELATED TO VB6 USING TABLES FROM MS-ACCESS DATABASE

I HAVE A TABLE 'VOUCHERS' CONTAINING FIELD VDATE(datatype: date).

i store 'txtfrom.text' into date_1(datatype:date) as

date_1=txtfrom.text

and

date_2=txtto.text

sql-command -
select vdate from vouchers where vdate between ' " & date_1 & " ' and ' " &date_2& " ';

THIS COMMAND IS SHOWING THE ERROR :' DATA TYPE MISMATCH'

i have tried other forms to like removing ' ' and " & &".....
but it is not working........
pls help me
ramee001
 
Posts: 4
Joined: Fri May 01, 2009 4:38 am

Return to ASP Forum

Who is online

Users browsing this forum: No registered users and 3 guests

cron