怎样在一个只有Win98操作系统的硬盘中建立一个Table.db的文件,该文件为表型,Pardox!!(100分)

  • 主题发起人 主题发起人 gmshello
  • 开始时间 开始时间
G

gmshello

Unregistered / Unconfirmed
GUEST, unregistred user!
怎样在一个只有Win98操作系统的硬盘中建立一个Table.db的文件,该文件为表型,Pardox!!!
急!急!
 
用delphi中的database desktop就行了
 
我写的很清楚了!只有Win98操作系统,没有安装Delphi!而且能说说怎样在不安装Delphi的情况下安装BDE和database desktop吗?或者安装其他的什么小软件可以实现上述的功能?????????????
 
delphi->tools->database desktop->file->new->table->Paradox 7
输入字段名称后,用右键选字段类型
 
把BDE中需要的Dll及语言支持文件拷贝到你的运行目录中,在程序中用CreateTable建立Table,示例如下:
with Table1 do begin
Active := False;
DatabaseName := 'DBDEMOS';
TableType := ttParadox;
TableName := 'CustInfo';

{ Don't overwrite an existing table }

if not Table1.Exists then begin
{ The Table component must not be active }
{ First, describe the type of table and give }
{ it a name }
{ Next, describe the fields in the table }
with FieldDefs do begin
Clear;
with AddFieldDef do begin
Name := 'Field1';
DataType := ftInteger;
Required := True;
end;
with AddFieldDef do begin

Name := 'Field2';
DataType := ftString;
Size := 30;
end;
end;
{ Next, describe any indexes }
with IndexDefs do begin
Clear;
{ The 1st index has no name because it is
{ a Paradox primary key }
with AddIndexDef do begin
Name := '';
Fields := 'Field1';
Options := [ixPrimary];
end;
with AddIndexDef do begin

Name := 'Fld2Indx';
Fields := 'Field2';
Options := [ixCaseInsensitive];
end;
end;
{ Call the CreateTable method to create the table }
CreateTable;
end;
end;
 
我在相似的情况下做过,我是把Desk Top整个文件夹拷走。能够正常建立DB文件。
仅作参考。
 
换个说法!!!怎么样在没有安装Delphi的情况下运行执行文件.EXE(.EXE中包括一个Table组件,其TableName为Table.db)??????!!!我在安装了Delphi的系统中可安全运行,但是在没有安装Delphi的系统中出现无法初始化数据库!!!!我的Form上包括DBGrid,Table,DataSource
 
找个单独的BDE安装程序应该可以吧。
 
To云虎:
把文件拷贝到哪个目录下??????
 
To云虎:
我没发现有单独的BDE安装程序
 
http://www.365base.com/Soft/sort19/251/2005/2005081238685.html
到这里下载一个安装文件,然后安装。我以前这么做过,但是不知道对你有没有帮助。
 
LuckyJackie说的是对的,这就是你要的方法:
把BDE中需要的Dll及语言支持文件拷贝到你的运行目录中
这样在其他机器中无需安装Delphi或注册即可运行运用了BDE的程序,当然,也可以写注册表,然后把BDE拷贝到注册表中指定的地方。
 
安装BDE,你最好使用打包工具把这个也打包上。
要么你就得该数据库为ACCESS了。
还有一个办法,使用TClientDataSet也许不需要BDE就直接支持平面本地数据库!
 
To WickedladII:
如果我把执行文件放在桌面的话!!!!!!!!那应该拷贝到那个目录呢 ??????????????
 
To 蓝叶菱
把什么打包上啊??????????
 
有必要把执行文件放桌面吗?建立一个快捷方式不就行了,另外,如果真的需要放桌面,那可以写注册表指定BDE的路径。这是我自己的一个例程,供参考:
procedure RegisterBDE;
var
Reg: TRegistry;
UseCount: Integer;
ProgramFilesDirectory: string;
begin
UseCount := 0;
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
if Reg.OpenKey('/Software/Borland/Database Engine', False) then
UseCount := StrToIntDef(Reg.ReadString('UseCount'), 0);
Reg.CloseKey;
finally
Reg.Free;
end;

ProgramFilesDirectory := GetProgramFilesDirectory;
Inc(UseCount);
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
Reg.OpenKey('/Software/Borland/Database Engine', True);
Reg.WriteString('DLLPath', IncludeTrailingPathDelimiter(ProgramFilesDirectory) + 'Common Files/Borland Shared/BDE/');
Reg.CloseKey;
Reg.OpenKey('/Software/Borland/BLW32', True);
Reg.WriteString('BLAPIPATH', IncludeTrailingPathDelimiter(ProgramFilesDirectory) + 'Common Files/Borland Shared/BDE/');
Reg.CloseKey;

Reg.OpenKey('/Software/Borland/Database Engine', True);
// Reg.WriteString('UseCount', '1');
Reg.WriteString('UseCount', IntToStr(UseCount));
Reg.CloseKey;
finally
Reg.Free;
end;
end;
 
多人接受答案了。
 
后退
顶部