Reply
Sql Command Using Variables ....a Roblem
Old 04-13-2009, 11:24 AM Sql Command Using Variables ....a Roblem
Junior Talker

Posts: 1
Name: lakshaya agnani
Trades: 0
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
lakshay_agnani is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 04-16-2009, 09:53 AM Re: Sql Command Using Variables ....a Roblem
Skilled Talker

Posts: 69
Trades: 0
can you show the whole code? It's hard to diagnose what's going on with just bits and pieces.
stbuchok is offline
Reply With Quote
View Public Profile
 
Old 04-27-2009, 06:28 AM Re: Sql Command Using Variables ....a Roblem
nayes84's Avatar
Super Talker

Latest Blog Post:
Difference between ASP And JSP
Posts: 139
Name: John
Location: Tokyo
Trades: 0
guess data in date_1 and date_2 are not in the right date format. try displaying the sql query and see how does it look like. this helps so much to identify the bug in your query
__________________
Upload Your Photos For Free | Submit Website To ePhoto Bay
ASP VS JSP
| Free Online Galleries
If I'm("Helpful") Then Add_Talkupation("nayes84") End If
nayes84 is offline
Reply With Quote
View Public Profile Visit nayes84's homepage!
 
Reply     « Reply to Sql Command Using Variables ....a Roblem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.16168 seconds with 13 queries