blash
asked on
I need to import computers system date in a *.dbf file trough a DBEdit
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
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
Hello
U can use the date function to return the current date
Table1.Append;
DBEdit2.Text := DateToStr(Date);
Table1.Post;
Mohammed
U can use the date function to return the current date
Table1.Append;
DBEdit2.Text := DateToStr(Date);
Table1.Post;
Mohammed
ASKER
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:\wind ows\deskto p\zbnalgl0 .dbf','c:\ windows\de sktop\temp \');
RenameFile('c:\windows\des ktop\temp\ zbnalgl0.d bf', 'c:\windows\desktop\zbnalg l.dbf');
Table2.TableName:= 'zbnalgl.dbf';
Table2.Active:=True;
//
Table2.Append;
DBEdit9.Text:=DateToStr(Da te);
Table2.Post;
end;
using the OnFormCreate event for this?
procedure TForm1.FormCreate(Sender: TObject);
begin
//DBEdit9.Text := FormatDateTime('dd.mm.yyyy
FMXUtils.CopyFile('c:\wind
RenameFile('c:\windows\des
Table2.TableName:= 'zbnalgl.dbf';
Table2.Active:=True;
//
Table2.Append;
DBEdit9.Text:=DateToStr(Da
Table2.Post;
end;
What is the database name in Table2?
Do you have a TDataBase component defined?.
Do you have a TDataBase component defined?.
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.
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.
Hello
use the full path for table name
Table2.TableName:= 'c:\windows\desktop\zbnalg l.dbf';
and it works fine in formcreate
Mohammed
use the full path for table name
Table2.TableName:= 'c:\windows\desktop\zbnalg
and it works fine in formcreate
Mohammed
I test ur code with paradox table and it worked fine
if u still have problems send me ur program at nasman@mogaza.org
if u still have problems send me ur program at nasman@mogaza.org
mnasman is OK
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
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
ASKER
Yes that's my e-mail: blagojj@makbanka.com.mk
Try my hotmail addres: bjgrandm@htomail.com
Try my hotmail addres: bjgrandm@htomail.com
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK
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