-
大小: 1.8MB文件类型: .zip金币: 1下载: 0 次发布日期: 2023-08-31
- 语言: PHP
- 标签: sqlservice
资源简介
需要连接sqlservice,一直连接不上,终于找到个可以用的,亲测没有问题可以用的,希望能帮到大家
代码片段和文件信息
//---------------------------------------------------------------------------------------------------------------------------------
// File: core_conn.cpp
//
// Contents: Core routines that use connection handles shared between sqlsrv and pdo_sqlsrv
//
// Copyright Microsoft Corporation
//
// Licensed under the Apache License Version 2.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.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing software
// distributed under the License is distributed on an “AS IS“ BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//---------------------------------------------------------------------------------------------------------------------------------
#include “core_sqlsrv.h“
#include
#include
#include
#include
#include
#include
// *** internal variables and constants ***
namespace {
// *** internal constants ***
// an arbitrary figure that should be large enough for most connection strings.
const int DEFAULT_CONN_STR_LEN = 2048;
// length of buffer used to retrieve information for client and server info buffers
const int INFO_BUFFER_LEN = 256;
// processor architectures
const char* PROCESSOR_ARCH[] = { “x86“ “x64“ “ia64“ };
// ODBC driver name.
const char *g_drivers[] =
{
“Driver={SQL Server Native Client 12.0};“
“Driver={SQL Server Native Client 11.0};“
“Driver={SQL Server Native Client 10.0};“
“Driver={SQL Native Client};“ /*
“Driver={SQL Server};“ */
};
int g_driverId = 0; // will be a number between 0 and 3
//const char CONNECTION_STRING_DRIVER_NAME[] = ““;
// default options if only the server is specified
const char CONNECTION_STRING_DEFAULT_OPTIONS[] = “Mars_Connection={Yes}“;
// connection option appended when no user name or password is given
const char CONNECTION_OPTION_NO_CREDENTIALS[] = “Trusted_Connection={Yes};“;
// connection option appended for MARS when MARS isn‘t explicitly mentioned
const char CONNECTION_OPTION_MARS_ON[] = “MARS_Connection={Yes};“;
// *** internal function prototypes ***
void build_connection_string_and_set_conn_attr( sqlsrv_conn* conn const char* server const char* uid const char* pwd
HashTable* options_ht const connection_option valid_conn_opts[]
void* driver__inout std::string& connection_string TSRMLS_DC );
void determine_server_version( sqlsrv_conn* conn TSRMLS_DC );
const char* get_processor_arch( void );
void get_server_version( sqlsrv_conn* conn char** server_version SQLSMALLINT& len TSRMLS_DC );
connection_option c
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-03-08 08:32 sqlsrv\
文件 134144 2014-06-19 08:38 sqlsrv\php_pdo_sqlsrv_53_nts.dll
文件 136704 2014-06-19 08:38 sqlsrv\php_pdo_sqlsrv_53_ts.dll
文件 134656 2014-06-19 08:39 sqlsrv\php_pdo_sqlsrv_54_nts.dll
文件 137216 2014-06-19 08:40 sqlsrv\php_pdo_sqlsrv_54_ts.dll
文件 146944 2014-06-19 08:41 sqlsrv\php_pdo_sqlsrv_55_nts.dll
文件 148992 2014-06-19 08:42 sqlsrv\php_pdo_sqlsrv_55_ts.dll
文件 146944 2014-08-30 10:19 sqlsrv\php_pdo_sqlsrv_56_nts.dll
文件 148992 2014-08-30 10:18 sqlsrv\php_pdo_sqlsrv_56_ts.dll
文件 146944 2014-06-19 08:38 sqlsrv\php_sqlsrv_53_nts.dll
文件 150016 2014-06-19 08:38 sqlsrv\php_sqlsrv_53_ts.dll
文件 146944 2014-06-19 08:39 sqlsrv\php_sqlsrv_54_nts.dll
文件 150016 2014-06-19 08:40 sqlsrv\php_sqlsrv_54_ts.dll
文件 160256 2014-06-19 08:41 sqlsrv\php_sqlsrv_55_nts.dll
文件 163328 2014-06-19 08:42 sqlsrv\php_sqlsrv_55_ts.dll
文件 160256 2014-08-30 10:10 sqlsrv\php_sqlsrv_56_nts.dll
文件 163328 2014-08-30 10:15 sqlsrv\php_sqlsrv_56_ts.dll
目录 0 2016-03-08 08:32 sqlsrv\source code\
目录 0 2016-03-08 08:32 sqlsrv\source code\pdo_sqlsrv\
文件 30828 2014-06-05 08:31 sqlsrv\source code\pdo_sqlsrv\core_conn.cpp
文件 6657 2012-04-10 04:48 sqlsrv\source code\pdo_sqlsrv\core_init.cpp
文件 55506 2014-06-18 03:58 sqlsrv\source code\pdo_sqlsrv\core_results.cpp
文件 87969 2014-06-06 07:11 sqlsrv\source code\pdo_sqlsrv\core_sqlsrv.h
文件 106299 2014-06-18 04:01 sqlsrv\source code\pdo_sqlsrv\core_stmt.cpp
文件 9481 2014-08-30 10:10 sqlsrv\source code\pdo_sqlsrv\core_stream.cpp
文件 13662 2014-06-06 07:18 sqlsrv\source code\pdo_sqlsrv\core_util.cpp
文件 52446 2014-06-07 05:10 sqlsrv\source code\pdo_sqlsrv\pdo_dbh.cpp
文件 14410 2012-10-12 04:17 sqlsrv\source code\pdo_sqlsrv\pdo_init.cpp
文件 12044 2012-04-10 04:48 sqlsrv\source code\pdo_sqlsrv\pdo_parser.cpp
文件 15681 2012-10-04 23:12 sqlsrv\source code\pdo_sqlsrv\pdo_sqlsrv.h
文件 50766 2012-10-12 07:45 sqlsrv\source code\pdo_sqlsrv\pdo_stmt.cpp
............此处省略25个文件信息
- 上一篇:基于PHP+MYSQL+Apache的论坛管理系统
- 下一篇:个人博客系统
评论
共有 条评论