资源简介
连接SQLSERVER所需的DBLIB,包括:头文件SQLDB.H和sqlfront.h 库bmdblib.lib,bldblib.lib,rldblib.lib,msdblib3.lib和ntwdblib.lib等文件.以及一个例子,仅供参考。
代码片段和文件信息
/*************************************************************************
PROGRAM: SQLTESTR - SQL Data Server sample program for MS DOS
Copyright (c) 1988-1995 by Microsoft Corp.
*************************************************************************/
#define DBMSDOS /* must identify operating system envorinment */
#include
#include /* DB-LIB header file (should always be included) */
#define NULL 0
main ()
{
PDBPROCESS dbproc; /* allocate a DB-LIB process structure */
PLOGINREC login; /* allocate a DB-LIB login structure */
int errno; /* variable to store DB-LIB error number in */
char *msg; /* used to receive DB-LIB error message pointer */
/* Variables used to store the returning data */
char au_lname[41];
char au_fname[20];
char id[12];
char phone[13];
char address[41];
char city[21];
char state[3];
char zip[6];
char getname[41];
char Servername[25];
RETCODE result_code;
/* Forward declarations of the error handler and message handler. */
int err_handler(PDBPROCESS int int int char* char*);
int msg_handler(PDBPROCESS DBINT int int char*);
if(dbinit() == (char *)NULL)
{
printf(“Communications layer not loaded\n“);
exit(1);
}
// Install the user-supplied error-handling and message-handling
// routines. They are defined at the bottom of this source file.
dberrhandle((DBERRHANDLE_PROC)err_handler);
dbmsghandle((DBMSGHANDLE_PROC)msg_handler);
// Get server‘s computer name
Servername[0] = NULL;
printf (“\nEnter Name of SQL Server: “);
gets (Servername);
login = dblogin(); /* get login record from DB-LIB */
DBSETLUSER (login “sa“); /* set the username */
DBSETLAPP (login “example1“); /* set the application name */
DBSETLPWD (login ““); /* set the SQL Server password */
DBSETLVERSION(loginDBVER60);
/* Now attempt to create and initialize a DBPROCESS structure */
if ((dbproc = dbopen (login Servername)) == NULL)
{
printf (“dbopen failed\n“);
return (1); /* exit program */
}
dbuse (dbproc “pubs“); /* use the “pubs“ database */
while (TRUE)
{
printf (“\nEnter author‘s last name to retrieve (return to exit): “);
gets (getname);
/* if only a return was entered */
if (getname[0] == NULL)
break;
/* construct command buffer to be sent to the SQL server */
dbcmd (dbproc “select au_id au_lname au_fname phone“);
dbcmd (dbproc “ address city state zip“);
dbcmd (dbproc “ from authors“);
dbfcmd (dbproc “ where au_lname = ‘%s‘“getname);
dbsqlexec (dbproc); /* send command buffer to SQL server */
/* now check the results from the SQL server */
while ((result_code = dbresults(dbproc)) != NO_MORE_RESULTS)
{
if (result_code == SUCCEED)
{
dbbind (dbproc 1 NTBSTRINGBIND (DBINT) 0 id);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 14744 1996-04-03 01:00 SQLDBLIB\adme.lib
文件 277504 1996-04-03 01:00 SQLDBLIB\bldblib.lib
文件 235008 1996-04-03 01:00 SQLDBLIB\bmdblib.lib
文件 19440 1996-04-03 01:00 SQLDBLIB\dacdll.lib
文件 1898 1996-04-03 01:00 SQLDBLIB\dtccfg.lib
文件 2770 1996-04-03 01:00 SQLDBLIB\dtccm.lib
文件 9998 1996-04-03 01:00 SQLDBLIB\dtchelp.lib
文件 2778 1996-04-03 01:00 SQLDBLIB\dtctrace.lib
文件 2674 1996-04-03 01:00 SQLDBLIB\dtcuic.lib
文件 4238 1996-04-03 01:00 SQLDBLIB\dtcuis.lib
文件 2718 1996-04-03 01:00 SQLDBLIB\dtcutil.lib
文件 3566 1996-04-03 01:00 SQLDBLIB\logmgr.lib
文件 13312 1996-04-03 01:00 SQLDBLIB\msdblib3.lib
文件 8912 1996-04-03 01:00 SQLDBLIB\msdtcprx.lib
文件 3546 1996-04-03 01:00 SQLDBLIB\msdtctm.lib
文件 86370 1996-04-03 01:00 SQLDBLIB\ntwdblib.lib
文件 10642 1996-04-03 01:00 SQLDBLIB\odbcss.h
文件 1068 1996-04-03 01:00 SQLDBLIB\odbcver.h
文件 39500 1996-04-03 01:00 SQLDBLIB\opends60.lib
文件 276425 1996-04-03 01:00 SQLDBLIB\rldblib.lib
文件 242633 1996-04-03 01:00 SQLDBLIB\rmdblib.lib
文件 5140 1996-04-03 01:00 SQLDBLIB\samprm.lib
文件 13112 1996-04-03 01:00 SQLDBLIB\sqldb.h
文件 24287 1996-04-03 01:00 SQLDBLIB\sqlfront.h
文件 278757 1996-04-03 01:00 SQLDBLIB\sqlole.h
文件 23492 1996-04-03 01:00 SQLDBLIB\sqloleid.h
文件 1137 1996-04-03 01:00 SQLDBLIB\srv.h
文件 7323 1996-04-03 01:00 SQLDBLIB\srvapi.h
文件 6152 1996-04-03 01:00 SQLDBLIB\srvconst.h
文件 2321 1996-04-03 01:00 SQLDBLIB\srvdbtyp.h
............此处省略25个文件信息
相关资源
- sqlserver2017 .iso镜像文件
- 基于Sql server的银行叫号系统的设计与
- 图书馆管理系统项目概述
- sqlserver数据库文件
- sqlserver定期导出excel表源代码.txt
- SQLServer2008破解版
- SQLServer基础总结
- Microsoft.SqlServer.Diagnostics.STrace.dll(1
- Sql Server 通用分页存储过程(适用与
- Node.js-将nodejs操作SQLServer简单化
- 学生管理系统.net+sqlserver
- SqlQueryStressSqlServer多线程压力测试小工
- sqlserver数据包
- ssm框架+SQLserver整合 已验证成功
- sqlserver数据库驱动
- sqlserver卸载清除工具
- DataGridView多表更新数据
- SQL Server 2014 各安装版本
- 自动杀掉SQLSERVER中的死锁进程
- WindowsServer2012 安装sqlserver2008 卸载ne
- sqlserver2012入门视频教程
- sqlserver 循环临时表插入数据到另一张
- Sqlserver主备数据库容灾
- SQLServer2005完全卸载全套工具,及说明
- 40集SQLServer2014基础入门视频教程SQLS
- sqlserver2008
- SQLSERVER数据库面试题及答案
- Servlet实现对SQLServer数据库的增删改查
- SQLServer2014各版本超全
- springboot druid maven多数据源mysql+SqlSer
评论
共有 条评论