Problems creating DataTable in .DBF File
-
Hi!! I'm having a problem( again) while creating a .dbf file. First, I have this line to create the table: Create Table Results.dbf (BuyDate Date) And this worked well. Now, I've this line to add a date in the table: Insert Into Results.dbf (20070922) But it gives me a "Data type mismacth" error. I've already saw that the date format is YYYYMMDD. So where is the error here?? :confused:
-
Hi!! I'm having a problem( again) while creating a .dbf file. First, I have this line to create the table: Create Table Results.dbf (BuyDate Date) And this worked well. Now, I've this line to add a date in the table: Insert Into Results.dbf (20070922) But it gives me a "Data type mismacth" error. I've already saw that the date format is YYYYMMDD. So where is the error here?? :confused:
Rafael Carmo wrote:
Hi!! I'm having a problem( again) while creating a .dbf file. First, I have this line to create the table: Create Table Results.dbf (BuyDate Date) And this worked well. Now, I've this line to add a date in the table: Insert Into Results.dbf (20070922) But it gives me a "Data type mismacth" error. I've already saw that the date format is YYYYMMDD. So where is the error here??
AFAIK, a DBF file stores all data as ASCII text only - maybe this is the issue here...
-
Rafael Carmo wrote:
Hi!! I'm having a problem( again) while creating a .dbf file. First, I have this line to create the table: Create Table Results.dbf (BuyDate Date) And this worked well. Now, I've this line to add a date in the table: Insert Into Results.dbf (20070922) But it gives me a "Data type mismacth" error. I've already saw that the date format is YYYYMMDD. So where is the error here??
AFAIK, a DBF file stores all data as ASCII text only - maybe this is the issue here...
-
Just only ASCII text?? So why is there a Date format for .dbf file...??? I tried to insert '20070922', "20070922" and this didn't work as well... :(
Snaider wrote:
Just only ASCII text?? So why is there a Date format for .dbf file...??? I tried to insert '20070922', "20070922" and this didn't work as well...
It's been a while since I have seen a DBF file... I think the Date type in a DBF file is a 10-char storage. Maybe you could try '03/13/2008' (depending upon your system locale)
-
Hi!! I'm having a problem( again) while creating a .dbf file. First, I have this line to create the table: Create Table Results.dbf (BuyDate Date) And this worked well. Now, I've this line to add a date in the table: Insert Into Results.dbf (20070922) But it gives me a "Data type mismacth" error. I've already saw that the date format is YYYYMMDD. So where is the error here?? :confused:
Try this Insert Into Test2 values ('09/22/2007'); and check the data in database.
Do good and have good.
-
Try this Insert Into Test2 values ('09/22/2007'); and check the data in database.
Do good and have good.
-
Hi!! I'm having a problem( again) while creating a .dbf file. First, I have this line to create the table: Create Table Results.dbf (BuyDate Date) And this worked well. Now, I've this line to add a date in the table: Insert Into Results.dbf (20070922) But it gives me a "Data type mismacth" error. I've already saw that the date format is YYYYMMDD. So where is the error here?? :confused: