sql语句
create database ...
create database ...
解决方案 »
- 关于PChar的问题。(100分,先给20,以防没有解决)
- 如何用Indy的HTTPServer接受文件上传?
- 关于.dcu的问题
- 谁能告诉我,65588***,这号码是上海哪个具体范围的?
- 关于QuickReport得一个奇怪的问题,哪位大大能帮我看一下?
- 如何运行word的宏?
- delphi中word文档的处理!
- 在Delphi中dbGrid触发ChangeColumn之前会触发什么事件谢谢~!
- 如何分发MDIAS程序?
- Cool控件的下载地址:本期电脑报上介绍的“创建不规则窗体”的控件。请各位发表使用感受
- IE标题栏 怎么样改变!!!!
- 请示范一个简单的dll.例:z=x+y。使用dll完成函数部分,然后从edit1和edit2输入x,y,按钮button1从label1显示z值
例子:
建立一个扩展名为“.rc” 的文件,内容如下:
database RCDATA "d:\access\demo.mdb",
保存为e:\test\test.rc后,编译为资源文件,编译方法如下(注:相应的路径需要改变)
E:\delphi6\Bin\brcc32.exe E:\test\test.rc然后在源文件中加入该资源文件。
{$R test.res}要建立数据库的读出,并保存到磁盘上。
procedure TForm1.Button1Click(Sender: TObject);
var
RS: TResourceStream;
begin
RS := TResourceStream.Create(Hinstance, 'database', RT_RCDATA);
RS.SaveToFile('test.mdb');
end;
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;
把tabletype该为access,