| View previous topic :: View next topic |
| Author |
Message |
Tran Duy An Guest
|
Posted: Tue May 25, 2004 3:13 pm Post subject: How to programatically set the level of DBF table to 4? |
|
|
Hello,
I wrote a program which creates some DBF tables and the users will open them
with Excel. However, the BDE by default creates them at level 7 that Excel
cannot read. How can I change the level of BDE to 4 programatically? Many
thanks for any answear.
An
|
|
| Back to top |
|
 |
Rick Carter Guest
|
Posted: Tue May 25, 2004 10:31 pm Post subject: Re: How to programatically set the level of DBF table to 4? |
|
|
| Quote: | I wrote a program which creates some DBF tables and the users will open
them
with Excel. However, the BDE by default creates them at level 7 that
Excel
cannot read. How can I change the level of BDE to 4 programatically? Many
thanks for any answear.
|
Interactively, in BDE Administrator, find the dBASE native driver and
change "Level" to "4."
You only need programmatically if you need to change it for all your
client's computers. If you need that, there may be a BDE API that does
the same thing.
Rick Carter
[email]carterrk (AT) despammed (DOT) com[/email]
Chair, Delphi/Paradox SIG, Cincinnati PC Users Group
--- posted by geoForum on http://delphi.newswhat.com
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Tue May 25, 2004 11:37 pm Post subject: Re: How to programatically set the level of DBF table to 4? |
|
|
Use the TTable.TableLevel property. I assume you are trying to set the
level of a table you are going to create.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Johan Guest
|
Posted: Wed May 26, 2004 12:24 pm Post subject: Re: How to programatically set the level of DBF table to 4? |
|
|
I have tried with setting TableLevel:= 4, but Excel cannot read the file. If
I go to BDE Administrator, then ConfigurationNativeDBase, and set the
level to 4, then Excel can read the created file. Because I deploy my
program to the persons who need to use the created files in Excel, I cannot
ask the users set the level manually. I would be grateful if you could show
me how to solve this problem.
An
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Wed May 26, 2004 1:48 pm Post subject: Re: How to programatically set the level of DBF table to 4? |
|
|
If you want to change the Level in BDE Administrator programatically
you will have to use the BDE API function DbiOpenCfgInfoList. See the
examples at www.borland.com/devsupport/bde/bdeapiex .
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Tran Duy An Guest
|
Posted: Wed May 26, 2004 3:57 pm Post subject: Re: How to programatically set the level of DBF table to 4? |
|
|
Thank you very much, Bill. I used example 2: Set a particular value in the
IDAPI.CFG configuration file (16-Bit Only) and (32-Bit, BDE v4.51 and
later):
Procedure SetConfigParameter(Param: string; Value: string);
Then applied to set the level of dBase files to 4 with the following
parameters:
SetConfigParameter('DRIVERSDBASETABLE CREATE;LEVEL','4');
However, it didn't work. When I open the BDE Administrator, the level is
still the same (7).
To run the above procedure, I had to add to the uses clause the following
units: DBTables, BDE, DB. The procedure ran without any errors. I am using
Delphi 7 with BDE Administrator ver. 5.01.
I don't know what was wrong with me. Thank you very much if you still
consider this problem.
An
"Bill Todd (TeamB)" <no (AT) no (DOT) com> wrote
| Quote: | If you want to change the Level in BDE Administrator programatically
you will have to use the BDE API function DbiOpenCfgInfoList. See the
examples at www.borland.com/devsupport/bde/bdeapiex .
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Wed May 26, 2004 7:09 pm Post subject: Re: How to programatically set the level of DBF table to 4? |
|
|
I tried example 3 and it worked for me.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
|