-
大小: 24.78MB文件類型: .zip金幣: 1下載: 0 次發布日期: 2023-07-15
- 語言: 其他
- 標簽: InterBase7.0??delphi2010??
資源簡介
InterBase7.0數據庫的建立且與Delphi2010的連接
工程文件
InterBase7.0下載
數據庫編輯軟件IBExpress下載
等文件下載請見:http://blog.csdn.net/yorkworlddream/article/details/17473913
代碼片段和文件信息
/*
?*????Program?type:??API?Interface
?*
?*????Description:
?*????????This?program?creates?a?new?database?given?an?SQL?statement
?*????????string.??The?newly?created?database?is?accessed?after?its
?*????????creation?and?a?sample?table?is?added.
?*
?*????????The?SQLCODE?is?extracted?from?the?status?vector?and?is?used
?*????????to?check?whether?the?database?already?exists.
?*
?*?The?contents?of?this?file?are?subject?to?the?Interbase?Public
?*?License?Version?1.0?(the?“License“);?you?may?not?use?this?file
?*?except?in?compliance?with?the?License.?You?may?obtain?a?copy
?*?of?the?License?at:
?*?http://www.borland.com/devsupport/interbase/opensource/IPL.html
?*
?*?Software?distributed?under?the?License?is?distributed?on?an
?*?“AS?IS“?basis?WITHOUT?WARRANTY?OF?ANY?KIND?either?express
?*?or?implied.?See?the?License?for?the?specific?language?governing
?*?rights?and?limitations?under?the?License.
?*
?*?The?Original?Code?was?created?by?Borland?Software?Corporation
?*?and?its?predecessors.??Portions?created?by?Borland?are?Copyright?(c)
?*?1994?-?2001?Borland?Software?Corporation.
?*?All?rights?reserved.
?*
?*?Contributor(s):
?*?????????????????Aaron?Ruddick?Interbase?QA?Borland?Software?Corp.
?*?????????????????Dan?Mikhayltsa??Interbase?QA?Borland?Software?Corp.
?*/
#include?
#include?
#include?
#include?“example.h“
#include?se.h>
int?pr_error?(long?ISC_FAR?*?char?ISC_FAR?*);
static?char?ISC_FAR?*create_tbl??=?“CREATE?TABLE?dbinfo?(when_created?DATE)“;
static?char?ISC_FAR?*insert_date?=?“INSERT?INTO?dbinfo?VALUES?(‘NOW‘)“;
int?main?(ARG(int?argc)?ARG(char?**?argv))
ARGLIST(int?argc)
ARGLIST(char?**argv)?
{
????isc_db_handle???newdb?=?NULL;??????????/*?database?handle?*/
????isc_tr_handle???trans?=?NULL;??????????/*?transaction?handle?*/
????long????????????status[20];????????????/*?status?vector?*/
????long????????????sqlcode;???????????????/*?SQLCODE??*/
????char????????????create_db[160];????????/*?‘create?database‘?statement?*/
????char????????????new_dbname[128];
????if?(argc?>?1)
????????strcpy(new_dbname?argv[1]);
????else
????????strcpy(new_dbname?“new.gdb“);
????/*
?????*????Construct?a?‘create?database‘?statement.
?????*????The?database?name?could?have?been?passed?as?a?parameter.
?????*/
????sprintf(create_db?“CREATE?DATAbase?‘%s‘“?new_dbname);
????
????/*
?????*????Create?a?new?database.
?????*????The?database?handle?is?zero.
?????*/
????
????if?(isc_dsql_execute_immediate(status?&newdb?&trans?0?create_db?1
???????????????????????????????????NULL))
????{
????????/*?Extract?SQLCODE?from?the?status?vector.?*/
????????sqlcode?=?isc_sqlcode(status);
????????/*?Print?a?descriptive?message?based?on?the?SQLCODE.?*/
????????if?(sqlcode?==?-902)
????????{
????????????printf(“\nDatabase?already?exists.\n“);
????????????printf(“Remove?%s?before?running?this?program.\n\n“?new_dbname);
????????}
????????/*?In?add
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2007-09-25?07:52??Interba
?????文件??????????45??2002-10-30?11:36??Interba
?????目錄???????????0??2006-09-20?14:44??Interba
?????文件???????23552??2002-10-30?11:36??Interba
?????目錄???????????0??2006-09-20?14:45??Interba
?????目錄???????????0??2006-09-20?14:45??Interba
?????文件?????????901??2002-10-30?11:36??Interba
?????目錄???????????0??2006-09-20?14:45??Interba
?????文件?????????773??2002-10-30?11:36??Interba
?????文件??????181248??2002-10-30?11:36??Interba
?????文件????????1138??2002-10-30?11:36??Interba
?????文件????????1138??2002-10-30?11:36??Interba
?????文件????????1138??2002-10-30?11:36??Interba
?????文件????????1138??2002-10-30?11:36??Interba
?????文件???????????3??2002-10-30?11:36??Interba
?????目錄???????????0??2006-09-20?14:45??Interba
?????文件???????????3??2002-10-30?11:36??Interba
?????目錄???????????0??2006-09-20?14:45??Interba
?????文件???????16384??2002-10-30?11:36??Interba
?????文件?????1148928??2002-10-30?11:36??Interba
?????目錄???????????0??2006-09-20?14:45??Interba
?????文件????????7168??2002-10-30?11:36??Interba
?????目錄???????????0??2006-09-20?14:45??Interba
?????文件????????1916??2002-10-30?11:36??Interba
?????文件?????????768??2002-10-30?11:36??Interba
?????文件?????????373??2002-10-30?11:36??Interba
?????文件????????1767??2002-10-30?11:36??Interba
?????文件??????????31??2002-10-30?11:36??Interba
?????文件?????????561??2002-10-30?11:36??Interba
?????目錄???????????0??2006-09-20?14:45??Interba
?????文件???????????3??2002-10-30?11:36??Interba
............此處省略896個文件信息
- 上一篇:2018年信息系統項目管理師考試葵花寶典之帶書簽
- 下一篇:新華龍單片機開發資料
評論
共有 條評論