⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sqlgetcursorname.c

📁 这个是内存数据库的客户端
💻 C
字号:
/* * The contents of this file are subject to the MonetDB Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.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 is the MonetDB Database System. * * The Initial Developer of the Original Code is CWI. * Portions created by CWI are Copyright (C) 1997-2007 CWI. * All Rights Reserved. *//* * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com *  * This file has been modified for the MonetDB project.  See the file * Copyright in this directory for more information. *//********************************************************************** * SQLGetCursorName() * CLI Compliance: ISO 92 * * Author: Martin van Dinther * Date  : 30 aug 2002 * **********************************************************************/#include "ODBCGlobal.h"#include "ODBCStmt.h"#include "ODBCUtil.h"static SQLRETURNSQLGetCursorName_(ODBCStmt *stmt, SQLCHAR *szCursor, SQLSMALLINT nCursorMaxLength, SQLSMALLINT *pnCursorLength){	(void) szCursor;	/* Stefan: unused!? */	(void) nCursorMaxLength;	/* Stefan: unused!? */	(void) pnCursorLength;	/* Stefan: unused!? */	/* TODO: implement the requested behavior when SQLSetCursorName() is implemented */	/* for now always return error */	/* No cursor name available */	addStmtError(stmt, "HY015", NULL, 0);	return SQL_ERROR;}SQLRETURN SQL_APISQLGetCursorName(SQLHSTMT hStmt, SQLCHAR *szCursor, SQLSMALLINT nCursorMaxLength, SQLSMALLINT *pnCursorLength){	ODBCStmt *stmt = (ODBCStmt *) hStmt;#ifdef ODBCDEBUG	ODBCLOG("SQLGetCursorName " PTRFMT "\n", PTRFMTCAST hStmt);#endif	if (!isValidStmt(stmt))		 return SQL_INVALID_HANDLE;	clearStmtErrors(stmt);	return SQLGetCursorName_(stmt, szCursor, nCursorMaxLength, pnCursorLength);}#ifdef WITH_WCHARSQLRETURN SQL_APISQLGetCursorNameA(SQLHSTMT hStmt, SQLCHAR *szCursor, SQLSMALLINT nCursorMaxLength, SQLSMALLINT *pnCursorLength){	return SQLGetCursorName(hStmt, szCursor, nCursorMaxLength, pnCursorLength);}SQLRETURN SQL_APISQLGetCursorNameW(SQLHSTMT hStmt, SQLWCHAR * szCursor, SQLSMALLINT nCursorMaxLength, SQLSMALLINT *pnCursorLength){	ODBCStmt *stmt = (ODBCStmt *) hStmt;	SQLRETURN rc;	SQLSMALLINT n;	SQLCHAR *cursor;#ifdef ODBCDEBUG	ODBCLOG("SQLGetCursorNameW " PTRFMT "\n", PTRFMTCAST hStmt);#endif	if (!isValidStmt(stmt))		 return SQL_INVALID_HANDLE;	clearStmtErrors(stmt);	prepWcharOut(cursor, nCursorMaxLength);	rc = SQLGetCursorName_(stmt, cursor, nCursorMaxLength, &n);	fixWcharOut(rc, cursor, n, szCursor, nCursorMaxLength, pnCursorLength, 1, addStmtError, stmt);	return rc;}#endif /* WITH_WCHAR */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -