Board index » delphi » time field reads back as date

time field reads back as date

I use a TAdoCommand to create a new table in a mdb database like this:

CREATE TABLE TEST (ARRIVAL TIME)

When I open this table with TAdoTable, the field ARRIVAL is of type
TDateField.
And in a connected TDBGrid I am only allowed to enter a date and not a time.

Thanks in advance to anyone with an explanation.

Martijn Harthoorn

 

Re:time field reads back as date


Quote
>I use a TAdoCommand to create a new table in a mdb database like this:

>CREATE TABLE TEST (ARRIVAL TIME)

>When I open this table with TAdoTable, the field ARRIVAL is of type
>TDateField.
>And in a connected TDBGrid I am only allowed to enter a date and not a time.

I can't duplicate that.  What Oledb driver are you using?
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:time field reads back as date


Quote
>I can't duplicate that.  What Oledb driver are you using?

( is this what you meant?: )

Provider=MSDataShape.1;
Data Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=C:\DB\TEST.MDB;

Martijn Harthoorn

Re:time field reads back as date


Quote
>( is this what you meant?: )

>Provider=MSDataShape.1;
>Data Provider=Microsoft.Jet.OLEDB.4.0;
>Data Source=C:\DB\TEST.MDB;

Yes that is your provider.   I suggest directly use the Jet 4 provider instead
of MsDatasphape provider when executing SQL DDL statements.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:time field reads back as date


Quote
>Yes that is your provider.   I suggest directly use the Jet 4 provider
instead
>of MsDatasphape provider when executing SQL DDL statements.

When I try:

   Provider=Microsoft.Jet.OLEDB.4.0;
   Data Source=C:\DB\TEST.MDB;

it still reads back as a TDateField,
If I try:

   Provider=Microsoft.Jet.OLEDB.4.0;
   Data Provider=Microsoft.Jet.OLEDB.4.0;
   Data Source=C:\DB\TEST.MDB;

I get the error: Could not find installable ISAM

what is, btw, the difference between the provider and the data provider?

Thanks for the help sofar :),
Martijn Harthoorn.

Re:time field reads back as date


Quote
>When I try:

>   Provider=Microsoft.Jet.OLEDB.4.0;
>   Data Source=C:\DB\TEST.MDB;

>it still reads back as a TDateField,
>If I try:

Is this in a new Table you created using this provide or in the table you
previously created.

Quote

>   Provider=Microsoft.Jet.OLEDB.4.0;
>   Data Provider=Microsoft.Jet.OLEDB.4.0;
>   Data Source=C:\DB\TEST.MDB;
>I get the error: Could not find installable ISAM
>what is, btw, the difference between the provider and the data provider?

Provider is the Ole DB provider ADO uses.  Data Provider is a property unique to
the MsDataShape provider an it references the provider that MSShapeProvider uses
to get its data.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads