挑战你的MSDOS和数据库知识,是高手请进... 环境是 MSDOS 622 BORLAND C++ 31服务器是win2000 sql server 7 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 就是Net-Library TSR可是我不知道在那里有? 就是Net-Library TSR在那里有? 前台可不可以用Tpasic写啊?相关技术你能否讲解一下啊?比如DOS前台与WIN2000如何联机的啊?谢谢。 //下面是初始化环境dbinit();//下面是设置登录用户名和口令login = dblogin()DBSETLUSER(login,"sa");DBSETLPWD(login,"PassWord");//下面是建立数据库系统的连接dbproc =dbopen(login,"ServerName") to : 78 用MS-CLIENTS 3.0与win2000相连C code://---------------------------------------------------------------------------#define DBNTWIN32#include <stdio.h>#include <windows.h>#include <sqlfront.h>#include <sqldb.h>// Forward declarations of the error handler and message handler. int err_handler(PDBPROCESS, INT, INT, INT, LPCSTR, LPCSTR);int msg_handler(PDBPROCESS, DBINT, INT, INT, LPCSTR, LPCSTR, LPCSTR, DBUSMALLINT);main(){ PDBPROCESS dbproc; // The connection with SQL Server. PLOGINREC login; // The login information. DBCHAR name[100]; DBCHAR city[100]; // Install user-supplied error- and message-handling functions. dberrhandle (err_handler); dbmsghandle (msg_handler); // Initialize DB-Library. dbinit (); // Get a LOGINREC. login = dblogin (); DBSETLUSER (login, "my_login"); DBSETLPWD (login, "my_password"); DBSETLAPP (login, "example"); // Get a DBPROCESS structure for communication with SQL Server. dbproc = dbopen (login, "my_server"); // Retrieve some columns from the authors table in the // pubs database. // First, put the command into the command buffer. dbcmd (dbproc, "SELECT au_lname, city FROM pubs..authors"); dbcmd (dbproc, " WHERE state = 'CA' "); // Send the command to SQL Server and start execution. dbsqlexec (dbproc); // Process the results. if (dbresults (dbproc) == SUCCEED) { // Bind column to program variables. dbbind (dbproc, 1, NTBSTRINGBIND, 0, name); dbbind (dbproc, 2, NTBSTRINGBIND, 0, city); // Retrieve and print the result rows. while (dbnextrow (dbproc) != NO_MORE_ROWS) { printf ("%s from %s\n", name, city); } } // Close the connection to SQL Server. dbexit (); return (0);}int err_handler (PDBPROCESS dbproc, INT severity, INT dberr, INT oserr, LPCSTR dberrstr, LPCSTR oserrstr){ printf ("DB-Library Error %i: %s\n", dberr, dberrstr); if (oserr != DBNOERR) { printf ("Operating System Error %i: %s\n", oserr, oserrstr); } return (INT_CANCEL);}int msg_handler (PDBPROCESS dbproc, DBINT msgno, INT msgstate, INT severity, LPCSTR msgtext, LPCSTR server, LPCSTR procedure, DBUSMALLINT line){ printf ("SQL Server Message %ld: %s\n", msgno, msgtext); return (0);} SQL中EXEC在函数中没法用,只好使用存贮过程,于是杯剧来了.... 循环查询问题 求删除以139开头的sql语句 在创建发布服务器时报18482错误,未能定义成远程服务器??郁闷中 存储过程里这样写判断语句为什么会错,在线等~~~~~~~ INSTEAD 触发器修改单号重复 想请各位推荐关于SqlServer说的比较好的书,讲解比较详细,容易懂的 如何取得远程服务器的名称 紧急求救,误删除LOG文件,导致数据文件无法恢复,怎么办啊!!! 如何安装Developer/2000 装了sql server 7,不知道为何机器速度变得奇慢无比 Sybase数据库如何锁住一个表?
可是我不知道在那里有?
在那里有?
相关技术你能否讲解一下啊?
比如DOS前台与WIN2000如何联机的啊?谢谢。
dbinit();
//下面是设置登录用户名和口令
login = dblogin()
DBSETLUSER(login,"sa");
DBSETLPWD(login,"PassWord");
//下面是建立数据库系统的连接
dbproc =dbopen(login,"ServerName")
用MS-CLIENTS 3.0与win2000相连C code:
//---------------------------------------------------------------------------
#define DBNTWIN32
#include <stdio.h>
#include <windows.h>
#include <sqlfront.h>
#include <sqldb.h>// Forward declarations of the error handler and message handler.
int err_handler(PDBPROCESS, INT, INT, INT, LPCSTR, LPCSTR);
int msg_handler(PDBPROCESS, DBINT, INT, INT, LPCSTR, LPCSTR,
LPCSTR, DBUSMALLINT);main()
{
PDBPROCESS dbproc; // The connection with SQL Server.
PLOGINREC login; // The login information.
DBCHAR name[100];
DBCHAR city[100]; // Install user-supplied error- and message-handling functions.
dberrhandle (err_handler);
dbmsghandle (msg_handler); // Initialize DB-Library.
dbinit (); // Get a LOGINREC.
login = dblogin ();
DBSETLUSER (login, "my_login");
DBSETLPWD (login, "my_password");
DBSETLAPP (login, "example"); // Get a DBPROCESS structure for communication with SQL Server.
dbproc = dbopen (login, "my_server"); // Retrieve some columns from the authors table in the
// pubs database. // First, put the command into the command buffer.
dbcmd (dbproc, "SELECT au_lname, city FROM pubs..authors");
dbcmd (dbproc, " WHERE state = 'CA' "); // Send the command to SQL Server and start execution.
dbsqlexec (dbproc); // Process the results.
if (dbresults (dbproc) == SUCCEED)
{
// Bind column to program variables.
dbbind (dbproc, 1, NTBSTRINGBIND, 0, name);
dbbind (dbproc, 2, NTBSTRINGBIND, 0, city); // Retrieve and print the result rows.
while (dbnextrow (dbproc) != NO_MORE_ROWS)
{
printf ("%s from %s\n", name, city);
}
} // Close the connection to SQL Server.
dbexit (); return (0);
}int err_handler (PDBPROCESS dbproc, INT severity,
INT dberr, INT oserr, LPCSTR dberrstr, LPCSTR oserrstr)
{
printf ("DB-Library Error %i: %s\n", dberr, dberrstr);
if (oserr != DBNOERR)
{
printf ("Operating System Error %i: %s\n", oserr, oserrstr);
}
return (INT_CANCEL);
}int msg_handler (PDBPROCESS dbproc, DBINT msgno, INT msgstate,
INT severity, LPCSTR msgtext, LPCSTR server,
LPCSTR procedure, DBUSMALLINT line)
{
printf ("SQL Server Message %ld: %s\n", msgno, msgtext);
return (0);
}