Solved

Query

Posted on 2000-02-18
3
168 Views
Last Modified: 2010-04-04
Hi

please tel me whats wrong with this
Query1.Sql.Add ('select * from Invoice');
Query1.Sql.Add ('Where Date >= "1/1/2000" and Date <= "31/1/2000"');
When i run the program give me type mismatch expression

0
Comment
Question by:sivatagiherceg
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 5 total points
ID: 2534396
hi,

A / is interpreted as M/D/Y. A . is interpreted as D.M.Y.

Thus :

11/1/99 is November 1, 1999.

11.1.99 is January 11, 1999.

here is an example with the orders.db from dbdemo

select *
from orders
where (SaleDate >= '04/12/1988') AND (SaleDate <= '08/12/1988')


Regards, Zif.
 
0
 
LVL 5

Expert Comment

by:TheNeil
ID: 2534402
Make sure that your dates are formatted correctly. I find that it expects them to be in the format

YYYY-MM-DD HH:MM:SS

You could also try getting rid of the "s

Have you tried your queries out in database desktop or somtehing similar?

The Neil

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 2534432
argh, sivatagiherceg,

sorry I didn't noticed the comment on your previous question. I don't get notified when a comment is given. Only when an answer is rejected or graded. Sorry!

Well, I think it should work now. Not?

Zif.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question