用interbase做数据库

<script type="text/javascript"> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<script type="text/javascript"> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
 

DATABASE STEP BY STEP(-)

 

有没有想过做一个数据库实践一下?

下面我以interbase―――C++Builder,介绍一个简单的例子(不过很详细)。

为什么选择interbase呢?因为它的安装很简单,但配置等各方面却跟其它数据库差不了多少。选择C++Builder,一来是它更容易跟interbase结合,二来它的数据库编程比较简单易学。

 

Step1建立自己的数据库(这里先只是建立一个数据库文件,为连接之用,后边在建立它的table

首先在interbaseinterbase Windows ISQLCreat一个新的数据库(Create Database):

#选择Local Engine

#在Database一栏中需要留心:此处要添数据库的完整路径及数据库的名称,最好带上扩展名*.gdb,例如:c:databasemydatabase.gdb

User NameSYSDBA

  Password masterkey   (如果你没有改过的话)

 

完工!你可以去看一下c:database中是否已经有了mydatabase.gdb.

 

 

Step2可以建立三种BDEinterbase的连接(建立别名Alias):

Method1. BDE中的IBLocal直接连接(最简单)

1.启动BDE Administrator

2 在左边的ListBox中选IBLocal,给它选择SERVER NAME  c:database mydatabase.gdb,搞定!

 

Method2. 直接用BDEinterbase驱动连接

1.  启动BDE Administrator

2.在左边的ListBox中右键弹出菜单,“New”命令,再选择interbase类型,“OK

3.新的连接已经出现了,可以给它该个名。最重要的是――给它选择SERVER NAME  c:database mydatabase.gdb

大功告成!

 

Method3.  ODBC连接(最麻烦的一种)

1. 在“控制面板”中打开“ODBC数据管理器”,并选择“系统DSN”页面;(如果你用的不是Win2000的话,就安照上边的方法,否则,“ODBC数据管理器”应该在“控制面板”中的“管理工具”里边)

2. 单击“添加”按钮,在弹出的对话框中的ListBox中选择“INTERSOLV

interbase ODBC Driver*.gdb)”, “完成

3.      在弹出的对话框中:

                                                         Data Source Name  给数据库起个名儿吧(就像给你的狗起个名儿一样),比如mydatabase

      Description      可以不添,或者写你想说的话

                                                          Database Name   这里要写数据库的全称,包括完整的路径,这里我们写上c:database mydatabase.gdb

4.      该“确定”了(其它的等你有空再添吧)

5.      现在到BDE AdministratorSQL Explorer也可以)看看了。你是不已经看到了“狗名” mydatabase,如果是的话,恭喜,Connect完成!可以休息了。

你要是不累的话,在做一件事情(以后会方便一点):

    选中mydatabase,在右边的DefinitionUSER NAME写上:SYSDBA

以后登录时就不用敲USER NAME,只要敲口令了。

 

以上三种方法中, 12是用C++Builder或者是Delphi开发常用的连接方式。方法3则亦可永远VC++等开发工具。

   下一期介绍interbase 中的数据类型,以及interbase一些重要的概念比如domain等。

  (以上是“翻译+实践”完成,如有需要相关资料着,请 mail:

                                   efoxxx@263.net)

<script type="text/javascript"> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<script type="text/javascript"> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
README FOR INTERBASE 5.6 Online documentation and Release Notes For a description of new features and changes in InterBase 5.6, use Acrobat Reader to view the ReleaseNotes.pdf file. In addition, the complete 5-volume document set for InterBase 5.5 is available in PDF format with InterBase 5.6. Use Adobe Acrobat Reader 3 to view these PDF files. To take advantage of the full-search indexing for the document set, you need Acrobat Reader 3.0.1 (or later) With Search. This version of Reader is included on your InterBase 5.6 CD-ROM. You can also download it from http://www.adobe.com/prodindex/acrobat/readstep.html If you go directly to this Adobe site, be sure to download the version "With Search", not the plain version. ACCESSING THE DOCUMENT SET: You can open any of the books directly from the InterBase folder in the Start menu if you have Acrobat Reader already installed and the PDF extension is associated with Acrobat Reader. To access the books from the Help menu in Server Manager, choose InterBase Help and choose the book you want from the "InterBase Books Online" section. ________________________ Uninstalling InterBase 5.6 The Windows InterBase installation allows you to choose between performing a complete install or selecting individual components. If you install a subset of the components, you can run the install again later to add more components. However, when you uninstall, only the components that you installed the last time are removed. ------------------------------------- Copyright (c) 1999 Inprise Corp. All rights reserved.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值