I have a C++ application that uses SQL Native Client to connect to a MS SQL Server 2000.
I am trying to retrieve a result from a TEXT column containing more data than the buffer initially allocated to it provides. To clarify my issue, I'll outline what I'm doing (code below):
allocate buffer of 1024 bytes use
bind buffer to column us...
I'm trying to use SQLBindParameter to prepare my driver for input via SQLPutData. The field in the database is a TEXT field. My function is crafted based on MS's example here:
http://msdn.microsoft.com/en-us/library/ms713824(VS.85).aspx.
I've setup the environment, made the connection, and prepared my statement successfully but when I ...
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_t...
Environment:
I'm working on a C++ application that uses SQL Native Client 9.0 to communicate with a SQL Server 2000 database.
Scenario:
2 connections are opened to the DBMS
Each connection is set to use transactions
A query on Connection1 works with TableA
A query on Connection2 works with TableB
TableB has a foreign key constraint o...
I'm working with SQL Native Client 9 in a C++ application that communicates with SQL Server 2000. I'm working on debugging things right now but something I've noticed that bothers me (mostly because it's creating significant clutter) is that sqlnclir.rll is being loaded and unloaded continuously and the following lines are being spammed...
Background:
I'm working with a program coded in C++ which uses ODBC on SQL Native Client to establish connections to interact with a SQL Server 2000 database.
Problem:
My connections are abstracted into an object which opens a connection when the object is instantiated and closes the connection when the object is destroyed. I can see t...
I'm working with a C++ application that uses SQL Native Client to communicate via ODBC with a SQL Server 2000 database.
Before doing any database work, I allocate an environment handle as follows:
retcode = SQLAllocHandle( SQL_HANDLE_ENV, SQL_NULL_HANDLE, &EnvironmentHandle );
This completes successfully.
To enable connection pooling...
Background:
I'm working on migrating from SQL Server 2000 to SQL Server 2005. This is providing DB service for a C++ application that uses SQL Native Client to communicate with SQL Server via ODBC.
Problem:
I'm attempting to insert QNAN into a float column in the database. In my application, this value is stored as a double (value: 1....
I'm supporting a legacy app written in MFC/C++. The database for the app is in SQL Server 2000. We bolted on some new functionality recently and found that when we change the SQL Provider from SQLOLEDB.1 to SQLNCLI.1 some code that is trying to retrieve data from a table via a stored procedure fails.
The table in question is pretty st...
Hello there,
i'm trying to build a setup package for a legacy vb6 software. the software itself connects to a sql server via sqlncli (native client). i've packaged all the dependencies and deploy them to a new machine running winxp and office2003.
now, from the target machine i can connect to the database (ms sqlserver 2005) that is ru...
I get the above error in one of my apps. However there is no reference to using the SQLNCLI provider. I know before the ConnectionString had "Provider=SQLNCLI".However now its changed to "Provider=SQLOLEDB" (using OLEDB since the same app connects to Access and SQL database). Why then do I still get the error?
...
Hi Everyone
I just need to know what's the difference between sql providers SQLOLEDB and SQLNCLI. I have one scenario where one SSIS package should fail. Now when I use SQLNCLI provider in the connection string the package terminates by throwing the error as expected. However when I use SQLOLEDB provider, the package behaves abnormally ...
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 "MyServerNam...