Board index » cppbuilder » MSAccess Table with BDE

MSAccess Table with BDE


2004-11-12 05:32:40 PM
cppbuilder83
Hi all,
One of my customers asked me to convert his old database to work with the
new inventory software I'm working on, unfortunately his old database is in
MS Access format. I'm working on BDE (and partly TurboDB). It would be easy
to convert the tables from MDB to DBF myself but he got many tables across a
number of branches. I couldn't have running accross the country just to
convert the tables for him. So, I'm writting a small utility to migrate data
from his MDB tables to DBF tables. However, I found it's trickier than I
thought.
From the TDatabase component, I saw the driver for MS Access is listed in
the DriverName. Later I discovered that to connect to an Access Table I have
to fill up the Parameters, which I have totally no idea what or how. Could
anybody point me to an example of how to connect to an Access Database using
TDatabase, what are the parameters I have to supply to the TDatabase. Thanks
in advance.
Regards.
 
 

Re:MSAccess Table with BDE

Hi,
What stops you to use ADO to access MDB? It's easy
to switch from BDE to ADO.
I used BDE to access MDB (via ODBC) but that concept
had lots of problems (non-live queries), and funny things when
using lookup data aware components (TDBLookup...). I was
looking for bugs, but when I switched to ADO, all the
problems gone...
Best regards,
Vladimir Stefanovic
 

Re:MSAccess Table with BDE

If you are still interested in BDE solution, try this:
1) Create ODBC Alias for your database
(ControlPanel/AdministrativeTools/ODBC/...)
Name it, for example: MY_DEMO_DB
2) Add TDatabase on Form1, and set properties:
AliasName: MY_DEMO_DB
DatabaseName: MyDemoDb
If your MDB have password:
LoginPrompt: false
Params:
Key Value
--- -----
username dbusername
password dbpassword
3) Connected: true
4) Add TTable on Form1, and set properties:
DatabaseName: MyDemoDb (NOT MY_DEMO_DB !!!)
TableName: OneTableNameFromYourMdb
Active: true
5) Add TDataSource on Form1, and set properties:
DataSet: TableName
6) Add TDBGrid on Form1, and set properties:
DataSource: DataSourceName
I hope, I mentioned all.
BUT anyway, I strongly recomend to switch to ADO
Best regards,
Vladimir Stefanovic
Choykw < XXXX@XXXXX.COM >wrote in message
Quote
Hi all,

One of my customers asked me to convert his old database to work
with the
new inventory software I'm working on, unfortunately his old
database is in
MS Access format. I'm working on BDE (and partly TurboDB). It would
be easy
to convert the tables from MDB to DBF myself but he got many tables
across a
number of branches. I couldn't have running accross the country just
to
convert the tables for him. So, I'm writting a small utility to
migrate data
from his MDB tables to DBF tables. However, I found it's trickier
than I
thought.

From the TDatabase component, I saw the driver for MS Access is
listed in
the DriverName. Later I discovered that to connect to an Access
Table I have
to fill up the Parameters, which I have totally no idea what or how.
Could
anybody point me to an example of how to connect to an Access
Database using
TDatabase, what are the parameters I have to supply to the
TDatabase. Thanks
in advance.

Regards.


 

{smallsort}

Re:MSAccess Table with BDE

"Vladimir Stefanovic" < XXXX@XXXXX.COM >wrote in message
Quote

If you are still interested in BDE solution, try this:
Thanks alot, Vladimir, I'll try it out.
Quote
<snipped>

BUT anyway, I strongly recomend to switch to ADO

The problem is, I'm totally unfamiliar with ADO, I tried, but it seems too
complicated for the schedule I allocated for this utility. May be I'll try
to learn a bit more about ADO when I have more time.
Once again, thanks a lot.
Regards.
Quote


Best regards,
Vladimir Stefanovic