Simple? Delphi database questions



I am adding a database to my PADSplus utility program, which will store
information about all components in the design, and allow editing and other
functions. It will be connected as an automation client to the PADS
program.

I am using Delphi 4. Perhaps you might say I should stop right there and
upgrade to at least D5, where apparently it adds full implementation of the
MDE engine for Access97, rather than the BDE engine of D4. I would prefer
using an Access database, but it would also be OK to use dBaseIV or Excel
format, which could then later be converted if desired.

I made a simple Access database, with three fields: RefDes (Unique Primary
Index), PartType, and Decal, and filled three records with data. Then I
exported in both Excel and dBaseIV format.

My DataSource1 Component is linked to Table1. I have a DBControlGrid1 and
also a DBGrid1 linked to DataSource1. I was able to make it work with
DatabaseName = dBase Files, TableName = BOMDATA, and TableType = ttDBase.

When I try to add an IndexFile, the browser shows BOMDATA.MDX, but when I
try to use it I get an error "Index does not exist". Similarly, if I try to
choose an IndexFieldName, the SelectEdit shows REFDES, but I also get an
error. I was able to choose "PRIMARYKEY" as IndexName, and the data now
seems to be sorted, and the MDX file appears to be updating. Maybe I don't
need to specify a file.

One minor problem is that the sorting is done strictly by ASCII value, so
"a" comes after "Z", but I should be able to fix that. I think the
application program already forces uppercase.

Now, if I try to use "Excel Files", however, I get a "Key Violation" error:
"[ODBC Excel Driver]Not enough info to connect to this DSN with
SQLconnect". I got similar errors with the Access database.

I probably have enough information to proceed with a dBase version, but I
would like to be able to use Excel and Access, or at least know why it
doesn't work now. I do have a book somewhere on Delphi4, so maybe I can
find some clues there.

When my application runs, I always get a login prompt. I know this can be
set to False in TDatabase, but I don't know how to turn this off with just
the TTable and TDataSource.

One final question. I will need a separate database for each document to
which I connect. Can I just create TDatabase components at runtime, or
create TTables?

Thanks,

Paul





.



Relevant Pages

  • Re: formatting columns
    ... >> I am preparing to set up a database in Access2002. ... He knows how to use Excel on a limited ... >> have the time to set up the Access database so I must do ... >> in the first cell, and then having to drap it down the ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Excel to Access
    ... > Is it possible to have an access database updated from an Excel ... INTO or UPDATE command with the appropriate ...
    (microsoft.public.excel.programming)
  • Re: Is Excel the best MS Office tool to use for this business appl
    ... I did download several of the MS Office Excel ... database for these items. ... the other end of this topic is the fact that my friend has no ... Compile and maintain my friends list of products and their cost, ...
    (microsoft.public.office.misc)
  • Re: Word 2007/Excell 2007 - random loss of field contents on mailm
    ... I think, for now, I will try to put a few dummy rows in the database while I ... the document to get data from Excel and insert it. ... use that as the data source for the merge. ... I want the field with data to insert that data in the Word doc. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Access or Excel?
    ... Bear in mind that the Excel can make use of Access data quite easily for the ... lend itself so easily to the sort of processing which a database application ... in fact just a special king of abstract entity type. ... Redundancy is where the database tells us the same 'fact' more than once, ...
    (microsoft.public.access.gettingstarted)