Showing posts with label build. Show all posts
Showing posts with label build. Show all posts

Sunday, March 25, 2012

Can't SqlCommand - Help.

Hi all,

I am using VS C++ 2005 and SQL Server 2005 to build a simple application which will work with a database.

I can write the code to open the database which all goes well, but as soon as I write in a 'SqlCommand' and execute it I get an error message telling me that the 'Connection' property hasn't been 'initialised'.

The code I have writted is as follows:

#include "stdafx.h"

using namespace System;

using namespace System::Data;

using namespace System::Data::Sql;

using namespace System::Data::SqlClient;

int main()

{

SqlConnection conn("Data Source=gps028;Initial Catalog=master;Integrated Security=True");

SqlCommand cmd("CREATE DATABASE dbTest");

conn.Open();

cmd.ExecuteNonQuery();

return 0;

}

Where am I going wrong with the code ?

Pete

You need to associate your command and connection. Right now they are unrelated. You can do this either with the

SqlCommand.Connection property, or
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.connection(VS.80).aspx

SqlConnection.CreateCommand() method.
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.createcommand(VS.80).aspx

|||

G'Day Todd,

Thanks for the help on this - all up and running again.

I ended up using the Connection.CreateCommand method.

Cheers

Pete

Thursday, March 22, 2012

Can't seem to build simple cube in SQL 2005

I have a relatively simple cube, with the exception that some of the tables in my data source view are named queries from different databases.

Whenever the cube processes, it fails with the following error:

Errors in the high-level relational engine. The following exception occurred while the managed IDbCommand interface was being used: Out-of-process use of OLE DB provider "SQLNCLI.1" with SQL Server is not supported..

When I switch the data source to use the OLEDB for SQL Server instead of the native client, it complains of invalid columns in the query (there are no invalid columns in the query, I can browse the data from the designer and run the query successfully).

Anyone know how to get past this issue?

Hi, Did you find a solution to this, as I'm experiencing the same situation.

Thanks,

Steve

|||Yes, I eventually figured it out. I had to switch every connection to use oledb for it to work, even ones not associated with the query giving the error.|||I hit this same issue as well...does anyone on the SSAS team know more about this? Why doesn't the default provider work? The strange thing is that was JUST working fine and I don't know why I started to receive this error.

Error 1 OLE DB error: OLE DB or ODBC error: Out-of-process use of OLE DB provider "SQLNCLI.1" with SQL Server is not supported.; 42000. 0 0|||Did you find an issue to this problem ? I encounter exactly the same thing.

Thanks|||I have not tried this again since sp2 came out, but I would make sure the service packs are applied. Otherwise, the only workaround is to change ALL the connections to use the OLEDB provider. If any of the connections use the new provider the error will continue to occur.|||Thank you for your reply. All my connections were using OLEDB provider and I still had the problem.

Anyway, by the same time we changed our test server (hosting both the databases and the visual studio solution) and I don't have the problem anymore with this new server. I hope it won't occure again !

Thanks again

Vincent

Can't seem to build simple cube in SQL 2005

I have a relatively simple cube, with the exception that some of the tables in my data source view are named queries from different databases.

Whenever the cube processes, it fails with the following error:

Errors in the high-level relational engine. The following exception occurred while the managed IDbCommand interface was being used: Out-of-process use of OLE DB provider "SQLNCLI.1" with SQL Server is not supported..

When I switch the data source to use the OLEDB for SQL Server instead of the native client, it complains of invalid columns in the query (there are no invalid columns in the query, I can browse the data from the designer and run the query successfully).

Anyone know how to get past this issue?

Hi, Did you find a solution to this, as I'm experiencing the same situation.

Thanks,

Steve

|||Yes, I eventually figured it out. I had to switch every connection to use oledb for it to work, even ones not associated with the query giving the error.|||I hit this same issue as well...does anyone on the SSAS team know more about this? Why doesn't the default provider work? The strange thing is that was JUST working fine and I don't know why I started to receive this error.

Error 1 OLE DB error: OLE DB or ODBC error: Out-of-process use of OLE DB provider "SQLNCLI.1" with SQL Server is not supported.; 42000. 0 0

|||Did you find an issue to this problem ? I encounter exactly the same thing.

Thanks
|||I have not tried this again since sp2 came out, but I would make sure the service packs are applied. Otherwise, the only workaround is to change ALL the connections to use the OLEDB provider. If any of the connections use the new provider the error will continue to occur.|||Thank you for your reply. All my connections were using OLEDB provider and I still had the problem.

Anyway, by the same time we changed our test server (hosting both the databases and the visual studio solution) and I don't have the problem anymore with this new server. I hope it won't occure again !

Thanks again

Vincent
sql

Can't seem to build simple cube in SQL 2005

I have a relatively simple cube, with the exception that some of the tables in my data source view are named queries from different databases.

Whenever the cube processes, it fails with the following error:

Errors in the high-level relational engine. The following exception occurred while the managed IDbCommand interface was being used: Out-of-process use of OLE DB provider "SQLNCLI.1" with SQL Server is not supported..

When I switch the data source to use the OLEDB for SQL Server instead of the native client, it complains of invalid columns in the query (there are no invalid columns in the query, I can browse the data from the designer and run the query successfully).

Anyone know how to get past this issue?

Hi, Did you find a solution to this, as I'm experiencing the same situation.

Thanks,

Steve

|||Yes, I eventually figured it out. I had to switch every connection to use oledb for it to work, even ones not associated with the query giving the error.|||I hit this same issue as well...does anyone on the SSAS team know more about this? Why doesn't the default provider work? The strange thing is that was JUST working fine and I don't know why I started to receive this error.

Error 1 OLE DB error: OLE DB or ODBC error: Out-of-process use of OLE DB provider "SQLNCLI.1" with SQL Server is not supported.; 42000. 0 0|||Did you find an issue to this problem ? I encounter exactly the same thing.

Thanks|||I have not tried this again since sp2 came out, but I would make sure the service packs are applied. Otherwise, the only workaround is to change ALL the connections to use the OLEDB provider. If any of the connections use the new provider the error will continue to occur.|||Thank you for your reply. All my connections were using OLEDB provider and I still had the problem.

Anyway, by the same time we changed our test server (hosting both the databases and the visual studio solution) and I don't have the problem anymore with this new server. I hope it won't occure again !

Thanks again

Vincent

Can't seem to build simple cube in SQL 2005

I have a relatively simple cube, with the exception that some of the tables in my data source view are named queries from different databases.

Whenever the cube processes, it fails with the following error:

Errors in the high-level relational engine. The following exception occurred while the managed IDbCommand interface was being used: Out-of-process use of OLE DB provider "SQLNCLI.1" with SQL Server is not supported..

When I switch the data source to use the OLEDB for SQL Server instead of the native client, it complains of invalid columns in the query (there are no invalid columns in the query, I can browse the data from the designer and run the query successfully).

Anyone know how to get past this issue?

Hi, Did you find a solution to this, as I'm experiencing the same situation.

Thanks,

Steve

|||Yes, I eventually figured it out. I had to switch every connection to use oledb for it to work, even ones not associated with the query giving the error.|||I hit this same issue as well...does anyone on the SSAS team know more about this? Why doesn't the default provider work? The strange thing is that was JUST working fine and I don't know why I started to receive this error.

Error 1 OLE DB error: OLE DB or ODBC error: Out-of-process use of OLE DB provider "SQLNCLI.1" with SQL Server is not supported.; 42000. 0 0|||Did you find an issue to this problem ? I encounter exactly the same thing.

Thanks|||I have not tried this again since sp2 came out, but I would make sure the service packs are applied. Otherwise, the only workaround is to change ALL the connections to use the OLEDB provider. If any of the connections use the new provider the error will continue to occur.|||Thank you for your reply. All my connections were using OLEDB provider and I still had the problem.

Anyway, by the same time we changed our test server (hosting both the databases and the visual studio solution) and I don't have the problem anymore with this new server. I hope it won't occure again !

Thanks again

Vincent

Can't seem to build simple cube in SQL 2005

I have a relatively simple cube, with the exception that some of the tables in my data source view are named queries from different databases.

Whenever the cube processes, it fails with the following error:

Errors in the high-level relational engine. The following exception occurred while the managed IDbCommand interface was being used: Out-of-process use of OLE DB provider "SQLNCLI.1" with SQL Server is not supported..

When I switch the data source to use the OLEDB for SQL Server instead of the native client, it complains of invalid columns in the query (there are no invalid columns in the query, I can browse the data from the designer and run the query successfully).

Anyone know how to get past this issue?

Hi, Did you find a solution to this, as I'm experiencing the same situation.

Thanks,

Steve

|||Yes, I eventually figured it out. I had to switch every connection to use oledb for it to work, even ones not associated with the query giving the error.|||I hit this same issue as well...does anyone on the SSAS team know more about this? Why doesn't the default provider work? The strange thing is that was JUST working fine and I don't know why I started to receive this error.

Error 1 OLE DB error: OLE DB or ODBC error: Out-of-process use of OLE DB provider "SQLNCLI.1" with SQL Server is not supported.; 42000. 0 0|||Did you find an issue to this problem ? I encounter exactly the same thing.

Thanks|||I have not tried this again since sp2 came out, but I would make sure the service packs are applied. Otherwise, the only workaround is to change ALL the connections to use the OLEDB provider. If any of the connections use the new provider the error will continue to occur.|||Thank you for your reply. All my connections were using OLEDB provider and I still had the problem.

Anyway, by the same time we changed our test server (hosting both the databases and the visual studio solution) and I don't have the problem anymore with this new server. I hope it won't occure again !

Thanks again

Vincent

Friday, February 10, 2012

Can't get SS Express SP2 to install on Vista build 5744

Having had no luck getting prior versions of Sql Server Express to install on Vista RC2. I was hoping that SP2 would install with no problems however I'm still getting the same error as before and can't find any working solution to this anywhere on the web.

The actual error I'm getting occurs when the install tries to start the SQL Server service and connect. I get

TITLE: Microsoft SQL Server 2005 Setup

SQL Server Setup could not connect to the database service for server configuration. The error was: [Microsoft][SQL Native Client]Shared Memory Provider: No process is on the other end of the pipe.
Refer to server error logs and setup logs for more information. For details on how to view setup logs, see "How to View Setup Log Files" in SQL Server Books Online.

This error apparently also occurs on other platforms than Vista. Any ideas how to get past this? The Vista install is still pretty much a clean install.

TIA Adrian Heath

Hi Adrian,

The most obvious question is, "did you check the setup logs?" as per the instructions in the message? The setup logs will help track down the root cause of the error. I've installed SSE on many different builds of Vista without problems, so I know it's possible.

Mike

|||

I did but the final entry basically says the same as the displayed error and it was hard to figure out if any other part of the preceeding 5Mb of log was relevant. The complete log entry is as follows. If you have any suggestions what else to look for in the log please let me know.

TIA Adrian Heath

Error Code: 233
MSI (s) (C0!C4) [22:58:58:097]: Product: Microsoft SQL Server 2005 Express Edition -- Error 29515. SQL Server Setup could not connect to the database service for server configuration. The error was: [Microsoft][SQL Native Client]Shared Memory Provider: No process is on the other end of the pipe.
Refer to server error logs and setup logs for more information. For details on how to view setup logs, see "How to View Setup Log Files" in SQL Server Books Online.

Error 29515. SQL Server Setup could not connect to the database service for server configuration. The error was: [Microsoft][SQL Native Client]Shared Memory Provider: No process is on the other end of the pipe.
Refer to server error logs and setup logs for more information. For details on how to view setup logs, see "How to View Setup Log Files" in SQL Server Books Online.
<Func Name='GetCAContext'>
<EndFunc Name='GetCAContext' Return='T' GetLastError='203'>
Doing Action: Do_sqlScript
PerfTime Start: Do_sqlScript : Fri Nov 17 22:58:58 2006
Service MSSQL$SQLEXPRESS with parameters '-m SqlSetup -Q -qLatin1_General_CI_AS -T4022 -T3659 -T3610 -T4010' is being started at Fri Nov 17 22:58:58 2006
Attempt to start service when it is already running
SQL service MSSQL$SQLEXPRESS started successfully waiting for SQL service to accept client connections
Service MSSQL$SQLEXPRESS started at Fri Nov 17 22:58:58 2006
SQL_ERROR (-1) in OdbcConnection::connect
sqlstate=08001, level=-1, state=-1, native_error=233, msg=[Microsoft][SQL Native Client]Shared Memory Provider: No process is on the other end of the pipe.

sqlstate=08001, level=-1, state=-1, native_error=233, msg=[Microsoft][SQL Native Client]Client unable to establish connection

Error Code: 0x800700e9 (233)
Windows Error Text: No process is on the other end of the pipe.
Source File Name: lib\odbc_connection.cpp
Compiler Timestamp: Wed Aug 2 16:21:01 2006
Function Name: OdbcConnection::connect@.connect
Source Line Number: 148

- Context --


Connecting to SQL Server
ExecuteSqlCommands
Originial error was 800700e9 (233)
Do_sqlScript
SqlScriptHlpr


|||This can have several causes, the most common problem is that you are using the wrong service account. This thread will help you to narrow down your problems:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=197758&SiteID=1

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Thanks

SS Express is now installed

I followed the instructions for removing certificates from here

http://support.microsoft.com/default.aspx/kb/309398/

(mentioned near the bottom of the link suggested above) and the install completed. I'm not sure what the two certificates were from, I guess they are Vista default certificates but if so why have more people not reported this problem?

Oh well it's working now

Thanks again for the help

Adrian Heath