sqlncli

Delphi with SQL Server: OLEDB vs. Native Client drivers

回眸只為那壹抹淺笑 提交于 2019-12-09 06:37:59
问题 I have been told that SQL Native Client is supposed to be faster than the OLEDB drivers. So I put together a utility to do a load-test between the two - and am getting mixed results. Sometimes one is faster, sometimes the other is, no matter what the query may be (simple select, where clause, joining, order by, etc.). Of course the server does the majority of the workload, but I'm interested in the time it takes between the data coming into the PC to the time the data is accessible within the

How to check if a client has SQLNCLI10 provider installed when browsing?

你说的曾经没有我的故事 提交于 2019-12-07 16:42:43
问题 I have a c# website that allows a client to connect directly to a remote SQL Server database from their PC , bypassing the web server, by using a 3rd party ActiveX control. I was originally using the SQLOLEDB provider and it was working fine. The clients are in an internal network (using Windows machines and Internet Explorer) and the website is not intended for exposure to the general internet. I had to upgrade from using the SQLOLEDB provider to the SQLNCLI10 provider to cater for the new

Failure to connect to SQl Server from Linux

天涯浪子 提交于 2019-12-05 17:55:23
I am trying to connect to SQL Server 2008 on CentOS 5.8. I am using unixODBC 2.3.0 and SQL Server ODBC Driver (www.microsoft.com/en-us/download/details.aspx?id=28160). When I try to test the connection by running: isql -v mydsn username password it givens me: [S1T00][unixODBC][Microsoft][SQL Server Native Client 11.0]Login timeout expired [08001][unixODBC][Microsoft][SQL Server Native Client 11.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is

Linked servers SQLNCLI problem. “No transaction is active”

﹥>﹥吖頭↗ 提交于 2019-12-01 00:36:56
Im trying to execute a stored procedure and simply insert its results in a temporary table, and I'm getting the following message: The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "MyServerName" was unable to begin a distributed transaction. OLE DB provider "SQLNCLI" for linked server "MyServerName" returned message "No transaction is active.". My query looks like this: INSERT INTO #TABLE EXEC MyServerName.MyDatabase.dbo.MyStoredProcedure Param1, Param2, Param3 Exact column number, names, the problem is not the result. MSDTC is allowed and started in

Linked servers SQLNCLI problem. “No transaction is active”

元气小坏坏 提交于 2019-11-30 18:17:13
问题 Im trying to execute a stored procedure and simply insert its results in a temporary table, and I'm getting the following message: The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "MyServerName" was unable to begin a distributed transaction. OLE DB provider "SQLNCLI" for linked server "MyServerName" returned message "No transaction is active.". My query looks like this: INSERT INTO #TABLE EXEC MyServerName.MyDatabase.dbo.MyStoredProcedure Param1, Param2

Need a row count after SELECT statement: what's the optimal SQL approach?

两盒软妹~` 提交于 2019-11-27 19:01:16
I'm trying to select a column from a single table (no joins) and I need the count of the number of rows, ideally before I begin retrieving the rows. I have come to two approaches that provide the information I need. Approach 1: SELECT COUNT( my_table.my_col ) AS row_count FROM my_table WHERE my_table.foo = 'bar' Then SELECT my_table.my_col FROM my_table WHERE my_table.foo = 'bar' Or Approach 2 SELECT my_table.my_col, ( SELECT COUNT ( my_table.my_col ) FROM my_table WHERE my_table.foo = 'bar' ) AS row_count FROM my_table WHERE my_table.foo = 'bar' I am doing this because my SQL driver (SQL

Need a row count after SELECT statement: what's the optimal SQL approach?

为君一笑 提交于 2019-11-26 22:45:10
问题 I'm trying to select a column from a single table (no joins) and I need the count of the number of rows, ideally before I begin retrieving the rows. I have come to two approaches that provide the information I need. Approach 1: SELECT COUNT( my_table.my_col ) AS row_count FROM my_table WHERE my_table.foo = 'bar' Then SELECT my_table.my_col FROM my_table WHERE my_table.foo = 'bar' Or Approach 2 SELECT my_table.my_col, ( SELECT COUNT ( my_table.my_col ) FROM my_table WHERE my_table.foo = 'bar'