yente
asked on
BDE installation with Installshield
When installing BDE using Installshield, I'd like to set the Database Level to 7, and the FourDigitYear, LeadingZerom and LeadingZerod to TRUE.
I already tried to make the changes in the IDAPI32.CNF file, but this doesn't work. I even tried to change all the other .CNF files, same result.
I found the dbiSetDateFormat API to change the Date settings, but I found nowhere how to change the Database Level.
Is there anyone who knows the answer to this problem?
I already tried to make the changes in the IDAPI32.CNF file, but this doesn't work. I even tried to change all the other .CNF files, same result.
I found the dbiSetDateFormat API to change the Date settings, but I found nowhere how to change the Database Level.
Is there anyone who knows the answer to this problem?
procedure SetConfigParameter(Param: string; Value: string);
var
hCur: hDBICur;
rslt: DBIResult;
Config: CFGDesc;
Path, Option: string;
Found: boolean;
Temp: array[0..255] of char;
begin
hCur := nil;
Found := False;
try
Check(dbiInit(Nil));
if Pos(';', Param) = 0 then
raise EDatabaseError.Create('Inv alid parameter passed to function. There must ' +
'be a semi-colon delimited sting passed');
Path := Copy(Param, 0, Pos(';', Param) - 1);
Option := Copy(Param, Pos(';', Param) + 1, Length(Param) - Pos(';', Param));
Check(DbiOpenCfgInfoList(n il, dbiREADWRITE, cfgPERSISTENT, StrPCopy(Temp, Path), hCur));
repeat
rslt := DbiGetNextRecord(hCur, dbiNOLOCK, @Config, nil);
if rslt = DBIERR_NONE then
begin
if StrPas(Config.szNodeName) = Option then
begin
StrPCopy(Config.szValue, Value);
Check(DbiModifyRecord(hCur , @Config, FALSE));
Found := True;
break;
end;
end
else
if rslt <> DBIERR_EOF then Check(rslt);
until rslt <> DBIERR_NONE;
if Found = False then
raise EDatabaseError.Create(Para m + ' entry was not found in configuration file');
finally
if hCur <> nil then Check(DbiCloseCursor(hCur) );
DbiExit;
end;
end;
SetConfigParameter('\SYSTE M\FORMATS\ ;FOURDIGIT YEAR','TRU E');
SetConfigParameter('\SYSTE M\FORMATS\ ;LEADINGZE ROM','TRUE ');
SetConfigParameter('\SYSTE M\FORMATS\ ;LEADINGZE ROD','TRUE ');
As for Database Level, I don't know what you mean.
var
hCur: hDBICur;
rslt: DBIResult;
Config: CFGDesc;
Path, Option: string;
Found: boolean;
Temp: array[0..255] of char;
begin
hCur := nil;
Found := False;
try
Check(dbiInit(Nil));
if Pos(';', Param) = 0 then
raise EDatabaseError.Create('Inv
'be a semi-colon delimited sting passed');
Path := Copy(Param, 0, Pos(';', Param) - 1);
Option := Copy(Param, Pos(';', Param) + 1, Length(Param) - Pos(';', Param));
Check(DbiOpenCfgInfoList(n
repeat
rslt := DbiGetNextRecord(hCur, dbiNOLOCK, @Config, nil);
if rslt = DBIERR_NONE then
begin
if StrPas(Config.szNodeName) = Option then
begin
StrPCopy(Config.szValue, Value);
Check(DbiModifyRecord(hCur
Found := True;
break;
end;
end
else
if rslt <> DBIERR_EOF then Check(rslt);
until rslt <> DBIERR_NONE;
if Found = False then
raise EDatabaseError.Create(Para
finally
if hCur <> nil then Check(DbiCloseCursor(hCur)
DbiExit;
end;
end;
SetConfigParameter('\SYSTE
SetConfigParameter('\SYSTE
SetConfigParameter('\SYSTE
As for Database Level, I don't know what you mean.
ASKER
To ronit:
The code yoiu passed indeed works for the date changes. However, it doesn't resolve my problem.
The Key I want to change is the following:
Drivers\Native\Paradox;Lev el
I tried to change it with your code, without success...
(code: SetConfigParameter('\DRIVE RS\NATIVE\ PARADOX;LE VEL','7'); )
The code yoiu passed indeed works for the date changes. However, it doesn't resolve my problem.
The Key I want to change is the following:
Drivers\Native\Paradox;Lev
I tried to change it with your code, without success...
(code: SetConfigParameter('\DRIVE
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much!!!
If so, then you can restructure your tables with DbiDoRestructure, but you can't change table type with this (at least so was in BDE API Help).
So I think, you must make new tables with the same structure, but with different table type (Level 7), and copy all records from old tables to new.
A.