Solved

Query

Posted on 2000-02-18
3
166 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now