-
大小: 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年信息系统项目管理师考试葵花宝典之带书签
- 下一篇:新华龙单片机开发资料
评论
共有 条评论