Solved

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

Posted on 2001-06-11
12
264 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
  • 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
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
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 50 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

831 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