Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I need to import computers system date in a *.dbf file trough a DBEdit

Posted on 2001-06-11
12
Medium Priority
?
272 Views
Last Modified: 2010-04-06
Hi guys,

I want to import the local computers date,
first, I want to "see" it in a DBEdit object, and then
I want it to be entered in a *.dbf table field.

How do I do this?

Thanks,
Blash
0
Comment
Question by:blash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
  • +1
12 Comments
 
LVL 2

Expert Comment

by:danysz
ID: 6176666
hi

u have to open a new record and when u open the form wiht new than write in the dbedit the date ( formatdatetime( ...))

when u will save it the date will be wroted in the file ..

daniel
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6176685
Hello

  U can use the date function to return the current date  

  Table1.Append;
  DBEdit2.Text := DateToStr(Date);
  Table1.Post;

Mohammed
0
 

Author Comment

by:blash
ID: 6176769
I get to see my sys date on the screen alright, but I can't see it in my database table. Maybe it's because I am
using the OnFormCreate event for this?

procedure TForm1.FormCreate(Sender: TObject);
begin
//DBEdit9.Text := FormatDateTime('dd.mm.yyyy',Now);
FMXUtils.CopyFile('c:\windows\desktop\zbnalgl0.dbf','c:\windows\desktop\temp\');
RenameFile('c:\windows\desktop\temp\zbnalgl0.dbf', 'c:\windows\desktop\zbnalgl.dbf');
Table2.TableName:= 'zbnalgl.dbf';
Table2.Active:=True;
//
Table2.Append;
DBEdit9.Text:=DateToStr(Date);
Table2.Post;
end;
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:Felixin
ID: 6176867
What is the database name in Table2?

Do you have a TDataBase component defined?.
0
 
LVL 2

Expert Comment

by:Felixin
ID: 6176891
Do you have a TDataSource defined?,

Does the data source point to Table2?

Does the DBEdit9 point to that TDataSource?

Does the DEBEdit9 field name point to the correponding field in the DBF table?

Sorry for the questions, but your code, except for the FMXUtils that I don't know what it is, looks fine.
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6176977
Hello

 use the full path for table name

Table2.TableName:= 'c:\windows\desktop\zbnalgl.dbf';

and it works fine in formcreate

Mohammed
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6176995
I test ur code with paradox table and it worked fine
if u still have problems send me ur program at nasman@mogaza.org
0
 
LVL 2

Expert Comment

by:Felixin
ID: 6176998
mnasman is OK
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6181245
Hello Blash

  I tried to send you email, but it gave me error is this ur email? : blagojj@makbanka.com.mk

  I sent you two emails, but they back to me, plz give me ur email

Mohammed
0
 

Author Comment

by:blash
ID: 6181330
Yes that's my e-mail: blagojj@makbanka.com.mk
Try my hotmail addres: bjgrandm@htomail.com
0
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 200 total points
ID: 6181387
the first one gave me error
i sent you to the second one bjgrandm@hotmail.com
0
 

Author Comment

by:blash
ID: 6181440
OK
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

604 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