使用数据资源管理器可视地创建数据库表 [英] Visually creating database tables with the Data Explorer
问题描述
我观看了视频与创作有关和在Delphi中使用数据库.该视频说明您可以使用代码,数据浏览器或SQLite3控制台应用程序创建数据库,但是我无法找到如何使用数据资源管理器创建数据库.有谁知道我可以这样做的方法吗?
I watched a video in relations to creating and working with databases in Delphi. The video states that you can create the database using code, the data explorer or the SQLite3 console application, but I am unable to find out how to create the database using the Data Explorer. Does anyone know a way I can go about doing this?
非常感谢您.
推荐答案
以下说明适用于XE3,但它们也适用于XE.
The instructions that follow are for XE3, but they should work for XE as well.
右键单击数据资源管理器中的 SQLite
项目,然后选择新建连接
.
Right-click on the SQLite
item in the Data Explorer, and choose New connection
.
在数据库
编辑控件中输入新数据库文件的完整路径(当然,尚不存在).
Enter the full path to your new database file (which, of course, won't exist yet) in the Database
edit control.
点击对话框右下角的 Advanced
按钮.找到 FailIfMissing
的条目,并将值从 True
更改为 False
,然后单击 OK
按钮以关闭高级属性
对话框.
Click the Advanced
button in the lower right corner of the dialog. Find the entry for FailIfMissing
, and change the value from True
to False
, and then click the OK
button to close the Advanced Properties
dialog.
单击对话框左下角的 Test连接
按钮(与您之前单击的 Advanced
按钮直接相对).您应该会看到一个对话框,显示测试连接成功
.关闭 New Connection
对话框.(如果此时没有成功的测试连接,请检查您输入的数据库的路径;如果该文件夹不存在,它将失败.如果 SQLite3.dll
不在您的Windows PATH
上,或者版本不正确.)
Click the Test connection
button in the lower left corner of the dialog (directly across from the Advanced
button you clicked before). You should get a dialog that says Test connection successful
. Close the New Connection
dialog. (If you don't get a successful test connection at this point, check the path to the database you entered; it will fail if the folder doesn't exist. It can also fail if the SQLite3.dll
isn't on your Windows PATH
or is the wrong version.)
要创建表,请为上面创建的新连接展开数据资源管理器"条目,以便您可以看到表
,视图
和过程
分支机构.右键单击 Tables
,然后从弹出菜单中选择 New table
.
To create tables, expand the Data Explorer entry for your new connection created above, so you can see the Tables
, Views
, and Procedures
branches. Right-click on Tables
, and choose New table
from the pop-up menu.
这篇关于使用数据资源管理器可视地创建数据库表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!