如果是用ADOConnection
ADOConnection.Connectstring:='*********';
ADOConnection.open;
就打开了。
ADOConnection.Connectstring:='*********';
ADOConnection.open;
就打开了。
解决方案 »
- 这种方法创建的COM是否不支持后期绑定(CreateOleObject)
- 如何计算两个时间的差
- Timer出错!
- 读串口数据的时候,怎么把发送出去的指令都读回来了?(AT指令)
- 小问题?
- 如何勇ADOConnection连接远程(通过Internet)SQL 2000数据库?
- 如何对中文姓名按汉语拼音排序。给出线索就有分呀。
- 急!急死我了!字符串问题,请各位帮忙!不胜感激!
- mimetype
- 各位delphi程序员工程师兄弟,现在到年底了,大家都来谈谈你们都拿多少钱的年终奖好吗?
- 怎样将query内的记录输出到Excel中,并同时调用Excel程序以显示,请详解!准备大出血,继续加分!!
- 有谁做了二进制显示的控件,最好有源代码
table1.active:=ture
如:现在得到某数据库的名m_database;我们没办法付给table啊。
table.databasename:=m_database;老出错。不行啊
table.databasename := path;//path 就是.db文件的本地目录了,如 c:\temp
table.tablename := 'mytable1';
table.open
就可以了啊
access我没有试过,应该差不多吧,如果要动态生成alias,可以用Session这个全局变量,里面
有诸如createalias这样的方法(对不起,我现在没有在运行,可以记忆不是太准确的)
你的方法是对的。谢谢你啦。我一定会给你加分。
大家对其他的数据库操作多发言啊。
菜鸟问题,竟然没人能回答?
顺便问一下:怎么生成dbf表;
如下程序为什么出错:
with table1 do
begin
{ The Table component must not be active }
Active := False;
{ First, describe the type of table and give }
{ it a name }
DatabaseName :='c:\'; TableType := ttDefault; TableName :='tmp.dbf' { Next, describe the fields in the table }
with FieldDefs do
begin
Clear; with AddFieldDef do
begin Name := 'fields1';
DataType := ttfoxpro;
Required := True;
end;
with AddFieldDef do
begin
Name :='fields2';
DataType := ftstring;
Size := 20;
end; 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 := 'fields1';
Options := [ixPrimary];
end;
//其它字段 with AddIndexDef do
begin
Name := 'fields2';
Fields := 'fields2';
Options := [ixCaseInsensitive];
end;
end; { Call the CreateTable method to create the table }
CreateTable;
Active := true; end;
TableType := ttDefault;
我改了很多类型。但是都不行。
大家快教教我啊。