Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



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
 
 
Register now for full access!
Old 04-16-2009, 09:53 AM Re: Sql Command Using Variables ....a Roblem
Extreme Talker

Posts: 246
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
Extreme Talker

Latest Blog Post:
Difference between ASP And JSP
Posts: 232
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
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

if(I'm("Helpful")) Add_Talkupation("nayes84");
nayes84 is offline
Reply With Quote
View Public Profile
 
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.11383 seconds with 12 queries