473,412 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Use Edit.text in Delphi for date and Access As database

1
I make program with Delphi Borland 7 and access as database, my problem is date between that I must put in edit.text first for the result came out base on the date that I put there.see My query before and tell me where I do wrong

modulkop.ADOisiSHU.SQL.Clear;
modulkop.ADOisiSHU.SQL.Add('INSERT INTO Simpanan( NoAnggota, NamaAnggota, Iuran, Sukarela, Tanggal, SHU, Saldo )');
modulkop.ADOisiSHU.SQL.Add('SELECT SHU.NoAnggota, Anggota.NamaAnggota, 0 AS Wajib, 0 AS Insentif, SHU.Tanggal, SHU.SHU, 0 AS Saldo');
modulkop.ADOisiSHU.SQL.Add('FROM Anggota INNER JOIN SHU ON Anggota.NoAnggota=SHU.NoAnggota WHERE(SHU.Tanggal = Between CDate('''+From.Text+''') and CDate('''+ToS.Text+''')');
modulkop.ADOisiSHU.ExecSQL;

see the bold one edit.text I'm named as From.text and ToS.text
Thank's before who wan't to help me

nb: Urgent,please
May 3 '07 #1
2 4018
Rabbit
12,516 Expert Mod 8TB
I make program with Delphi Borland 7 and access as database, my problem is date between that I must put in edit.text first for the result came out base on the date that I put there.see My query before and tell me where I do wrong

modulkop.ADOisiSHU.SQL.Clear;
modulkop.ADOisiSHU.SQL.Add('INSERT INTO Simpanan( NoAnggota, NamaAnggota, Iuran, Sukarela, Tanggal, SHU, Saldo )');
modulkop.ADOisiSHU.SQL.Add('SELECT SHU.NoAnggota, Anggota.NamaAnggota, 0 AS Wajib, 0 AS Insentif, SHU.Tanggal, SHU.SHU, 0 AS Saldo');
modulkop.ADOisiSHU.SQL.Add('FROM Anggota INNER JOIN SHU ON Anggota.NoAnggota=SHU.NoAnggota WHERE(SHU.Tanggal = Between CDate('''+From.Text+''') and CDate('''+ToS.Text+''')');
modulkop.ADOisiSHU.ExecSQL;

see the bold one edit.text I'm named as From.text and ToS.text
Thank's before who wan't to help me

nb: Urgent,please
I don't know about Delphi but in Access there is no = sign when using BETWEEN
May 3 '07 #2
cyberdwarf
218 Expert 100+
Well spotted that rodent <g>
May 3 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: George Stout | last post by:
First off I do not know alot about writing queries to an Access Database from an ASP page. This is why I need help. I have an Events database for 6 colleges in our metro area. On the homepage I...
9
by: BCS | last post by:
I have a web site in which the site administrator can input information to a database through a web form. The information then gets displayed on ASP pages. One field is a large text field. Of...
2
by: sarah18web | last post by:
Hello, the following problem: I use Delphi 6 to access a MS Access Database. In short, the Delphi Code looks like this: ADOConnection1.Open; ADOQuery1.Close; ADOQuery1.SQL.Text := 'SELECT...
1
by: Miguel Dias Moura | last post by:
Hello, I have a completely dynamic web site all based in one 10 tables included in one Access Database. The web site is all done in ASP.Net / VB. I am looking for an easy way to create an...
0
by: JT | last post by:
I have a web page that I want for the user to be able to enter their Name, address, Phone number, email, and comments and then click submit. I created a database with fields corresponding to the...
12
by: dennist685 | last post by:
Can't edit, delete or add row in an Access database in a website 2003 When I implement a walkthrough using Northwind I have no trouble doing this. Also, in a windowsforms project I have no...
0
by: Mark A. Sam | last post by:
Hello, I set up a DetailsView control with an names Access DB as the DataSource. The tasks menu doesn't offer Updating and Inserting, so I set the AutoGenerateInsertButton and...
2
by: Mr-E | last post by:
Hi all, I've been trying for a few weeks now to make a program in Visual Studio 2005 that has a combobox to select all the tables in a database. This is a part I already have. When you have...
0
by: cathal670 | last post by:
Here is the link to a zip file containing my web site, database is in the database folder My Web Site To download it, type in the verification text, wait the 30 second delay and press the grey...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.