Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Thursday, March 29, 2012

Error: Data source name not found and No default driver specified

Hello all,
I have an application which was written in VB6. I used
DSNless connection for the odbc connection to access sql 8.0. The
application works fine on one machine and when I try to run the appl.
on another machine I got this error. Any idea why' Here is my
connection string:
DSNName = "Driver={SQL Server};" & _
"Server=dummy;" & _
"Database=sql_data;" & _
"Uid=crystal"
The user id does not require a password.. Thank you.
SherryThis is a question for a VB group, not a SQL server group, but it sounds
like your DSNName is empty. Are you getting this value from an INI file,
the registry, or is it hardcoded in your app? You will most likely find
that this value is missing, wherever you define it.
Put in a message box that shows DSNName just prior to creating the
connection, and confirm that it is actually populated (I don't think it is).
<sunpalozzi@.gmail.com> wrote in message
news:1138811193.427214.282490@.g43g2000cwa.googlegroups.com...
> Hello all,
> I have an application which was written in VB6. I used
> DSNless connection for the odbc connection to access sql 8.0. The
> application works fine on one machine and when I try to run the appl.
> on another machine I got this error. Any idea why' Here is my
> connection string:
> DSNName = "Driver={SQL Server};" & _
> "Server=dummy;" & _
> "Database=sql_data;" & _
> "Uid=crystal"
> The user id does not require a password.. Thank you.
> Sherry
>|||Maybe the other machine doesn't have MDAC installed?
http://www.aspfaq.com/2057
Once you have the most recent version installed, an OLEDB connection string
will be better in most cases:
ConnectionString = _
"Provider=SQLOLEDB.1; " & _
"Data Source=dummy; " & _
"Initial Catalog=sql_data; " & _
"User ID=crystal; " & _
"Password="
<sunpalozzi@.gmail.com> wrote in message
news:1138811193.427214.282490@.g43g2000cwa.googlegroups.com...
> Hello all,
> I have an application which was written in VB6. I used
> DSNless connection for the odbc connection to access sql 8.0. The
> application works fine on one machine and when I try to run the appl.
> on another machine I got this error. Any idea why' Here is my
> connection string:
> DSNName = "Driver={SQL Server};" & _
> "Server=dummy;" & _
> "Database=sql_data;" & _
> "Uid=crystal"
> The user id does not require a password.. Thank you.
> Sherry
>|||thank you for all replies.. I did post in the vb group as well.. The
wire part is the same application is work on one pc but not the
another... I will try to find out if there a MDAC install on the
problem pc.. thanks.
Sherry

Tuesday, March 27, 2012

Error: connection is busy with results for another hstmt

Good Afternoon. I have a Crystal report that accesses a sql 2000 server. W
hen I run the report twice with the same parrameters. I get the following e
rror:
crystal reports connection is busy with results for another hstmt
As I understand it, this has to do with multiple record sets, and something
to the effect that my report is not consuming everything and therefore leavi
ng a cursor.
And while I understand that for the most part, I can't even begin to think h
ow to troubleshoot the report and find the problem. It's a HUGE report with
excess of 30 subreports. It is designed to only return 1 record, with nume
rous fields from throughout
the database placed on the report. Like I said it has numerous subreports,
and all are linked to the same URN. Anyway, is there anything I can do shor
t of upgrading the server to 2005?
From http://www.developmentnow.com/g/111...server-odbc.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.comafter nearly 30 hours of searching, I finally posted my question here.
What's funny is that 2 hours later I found my answer:
http://support.microsoft.com/kb/173410
From http://www.developmentnow.com/group...
=995268
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com

Error: connection is busy with results for another hstmt

Good Afternoon. I have a Crystal report that accesses a sql 2000 server. When I run the report twice with the same parrameters. I get the following error:
crystal reports connection is busy with results for another hstmt
As I understand it, this has to do with multiple record sets, and something to the effect that my report is not consuming everything and therefore leaving a cursor.
And while I understand that for the most part, I can't even begin to think how to troubleshoot the report and find the problem. It's a HUGE report with excess of 30 subreports. It is designed to only return 1 record, with numerous fields from throughout the database placed on the report. Like I said it has numerous subreports, and all are linked to the same URN. Anyway, is there anything I can do short of upgrading the server to 2005?
From http://www.developmentnow.com/g/111_2007_7_0_0_0/sql-server-odbc.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
after nearly 30 hours of searching, I finally posted my question here.
What's funny is that 2 hours later I found my answer:
http://support.microsoft.com/kb/173410
From http://www.developmentnow.com/groups/viewthread.aspx?newsgroupid=111&threadid=995268
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com

error: connection is busy

Error: 0xC0202009 at Load SQL Deals, Insert SQL Deals [12494]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Connection is busy with results for another command".

Why isn't the connection manager managing this?

How can I trace the cause? The data flow component (insert SQL deals) is just a simple INSERT statment.You can always run SQL Profiler to see what's going on.

Error: An error occurred due to no connection

This error is for Nov RTM running under "NETWORK SERVICE" account.

I created a data source "MyDataSource". It looks like:
<DataSource xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dwd="http://schemas.microsoft.com/DataWarehouse/Designer/1.0" xsi:type="RelationalDataSource" dwd:design-time-name="2d2b4fc8-af5c-4314-9155-384afd11fb70" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<ID>MyDataSource</ID>
<Name>MyDataSource</Name>
<CreatedTimestamp>0001-01-01T05:00:00Z</CreatedTimestamp>
<LastSchemaUpdate>0001-01-01T05:00:00Z</LastSchemaUpdate>
<ConnectionString>Provider=SQLOLEDB.1;Data Source=dbserver\my_instance;Integrated Security=SSPI;Initial Catalog=MyDataSource</ConnectionString>
<ConnectionStringSecurity>Unchanged</ConnectionStringSecurity>
<ImpersonationInfo>
<ImpersonationMode>ImpersonateServiceAccount</ImpersonationMode>
<ImpersonationInfoSecurity>Unchanged</ImpersonationInfoSecurity>
</ImpersonationInfo>
<Timeout>PT0S</Timeout>
</DataSource>

In my package, I obtain a new connection from the data source (test connection succeeds). I use a data flow task. Inside the data flow task I have a flat file source and an Ole Db Destination. For configuring OleDbDestination, I can see in the drop-down a list of tables in my database. When I select the desired table and click "preview", I get:
TITLE: Microsoft Visual Studio

Error at Data Flow Task - my task [OLE DB Destination [831]]: An error occurred due to no connection. A connection is required when requesting metadata.

--
ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC0202022 (Microsoft.SqlServer.DTSPipelineWrap)


BUTTONS:

OK
TIA,
Nitesh

Can you please check that you are not working with "Work Offline" settings.

Thursday, March 22, 2012

error: 40 - Could not open a connection to SQL Server

I posted this on the Dotnetnuke forums but no answer for it, so since it is a SQL error I guess maybe someone here might know.

I installed the core forum that comes with the installation, the page runs great until I add the forum module.

I get this error:

A critical error has occurred.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

The portal is in godaddy if this can help.

Thanks,

Erick

This problem usually occurs due to these reasons:

1. either your Datasource name is not set to the right value in web.config. If this is the case, check your web.config value with the GoDaddy's SQL server source name value (ask them for this).

2. remote connections are not allowed or there is some firewall issue. For this too contact GoDaddy support.

Hope this helps,

Vivek

error: 40 - Could not open a connection to SQL Server

I have created a new aspx site on 'server 1' which connects to an sql server 200 on 'server 2' 'Server 1' is a test server and all works fine. I then move the site onto 'server 3' and receive the error below.

This must be a problem with 'server 3'. I have installed .net version 2 on this server and there are currently no aspx sites running of this server. There must be smothering not configured right. There are other sites on the server that are talking to the SQL server.

Any help would be great.

Thanks

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

 
[SqlException (0x80131904): An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
  System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735059
  System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
  System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +820
  System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
  System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
  System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
  System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
  System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
  System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
  System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
  System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
  System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
  System.Data.SqlClient.SqlConnection.Open() +111
  System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
  System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
  System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
  System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
  System.Web.UI.WebControls.Repeater.GetData() +50
  System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +232
  System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +53
  System.Web.UI.WebControls.Repeater.DataBind() +72
  System.Web.UI.WebControls.Repeater.EnsureDataBound() +55
  System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +12
  System.Web.UI.Control.PreRenderRecursiveInternal() +77
  System.Web.UI.Control.PreRenderRecursiveInternal() +161
  System.Web.UI.Control.PreRenderRecursiveInternal() +161
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

Hi,

I also faced same problem. I was using following connection string.

<add name="ConnectionString" connectionString="data source=local;initial catalog=Rainbow;integrated security=True;User ID=;Password="/>

And modified to this.

<add name="ConnectionString" connectionString="data source=localhost;initial catalog=Rainbow;integrated security=True;User ID=;Password="/>

It started working in my case :)-

Regards,

Gaurav Goel

error: 40 - Could not open a connection

I am developing a web service that uses a sql data connection.

The sql database is on a server, and the development version of my web service is on my pc.

I can connect/access the data accross my network when I run the service on my PC, but as soon as I put the web service onto the server(with the sql) it displays, the service wont function - error: 40 - could not open a connection....

I presume that sql is configured correctly as I am recieving data back when I request it accross the network. I dont understand why it wont work when I have the service on the server with the sql?

Any help will be appreciated.

Do you mean your web service and SQL server are on the same machine? Can you post your connection string here? On which account your web service is running?|||

Yes they are both on the same server

"Data Source=SV1;Initial Catalog=SiteVisitSQL;Integrated security=sspi"

My web service is running on IUSR_SV1, I have created an account for the database/user in Microsoft SQL Server Management Studio Express

Ive never configured anything like this before so any help is much appreciated.

|||

Thanks for all your help

I solved this by adding a user for NT AUTHORITY\NETWORK SERVICE in SQL Management studio

Error: 26 - Error Locating Server/Instance Specified - (My hosting company says it's in my conn

Hi All...

I am trying to move my site (incomplete) for testing and I am finding that the Db connection process to be

the most difficult, well back to my problem. I can't seem to get past this error and am frustrated with overall

connectivity problems. Please help!!!

===================================================================================

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[SqlException (0x80131904): An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735123 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +820 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197 System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42 System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83 System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160 System.Web.UI.WebControls.Login.AttemptLogin() +105 System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

Now you all must admit that, if your somewhat new to this databasing, It's a ***.

The source for my application is Visual Web Designer 2005 Express

It is an ASP.Net driven site with membership roles and all the good stuff.

the latest theory is that I need to change the provider config in the web.config file from AspNetSqlProvider

to something else. Most of my complications and frustrations come from GoDaddy and no access to the

shared server (understandibly).

I hope I gave enough info for help and not too much.. Smile

Dave

Please check this blog for solutions:

http://blogs.msdn.com/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx

sql

error: 26 - Error Locating Server/Instance Specified

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Does anyone know what could be wrong ?

Check if the local/remote connections have been enabled for ur instamce....Launcg SQL Server Surface Area configuration...Connections and services...Check Local and Network connections.....|||Looks like you are trying to connect a remote named instance. To make it work, SQL Browser on the remote server must be enabled, UDP port 1434 should be put into exception if firewall presents.|||

I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

THANKS IF ANY BODY SOLVE MY PROBLEM

|||

Naeem Sheikh wrote:

I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

THANKS IF ANY BODY SOLVE MY PROBLEM

Thnanks i wonder firewall is blocking my tcp/ip port and now i am connecting to the server|||Yes. It that is necessary.

error: 26 - Error Locating Server/Instance Specified

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Does anyone know what could be wrong ?

Check if the local/remote connections have been enabled for ur instamce....Launcg SQL Server Surface Area configuration...Connections and services...Check Local and Network connections.....|||Looks like you are trying to connect a remote named instance. To make it work, SQL Browser on the remote server must be enabled, UDP port 1434 should be put into exception if firewall presents.|||

I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

THANKS IF ANY BODY SOLVE MY PROBLEM

|||

Naeem Sheikh wrote:

I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

THANKS IF ANY BODY SOLVE MY PROBLEM

Thnanks i wonder firewall is blocking my tcp/ip port and now i am connecting to the server|||Yes. It that is necessary.

error: 26 - Error Locating Server/Instance Specified

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Does anyone know what could be wrong ?

Check if the local/remote connections have been enabled for ur instamce....Launcg SQL Server Surface Area configuration...Connections and services...Check Local and Network connections.....|||Looks like you are trying to connect a remote named instance. To make it work, SQL Browser on the remote server must be enabled, UDP port 1434 should be put into exception if firewall presents.|||

I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

THANKS IF ANY BODY SOLVE MY PROBLEM

|||

Naeem Sheikh wrote:

I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

THANKS IF ANY BODY SOLVE MY PROBLEM

Thnanks i wonder firewall is blocking my tcp/ip port and now i am connecting to the server|||Yes. It that is necessary.

error: 26 - Error Locating Server/Instance Specified

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Does anyone know what could be wrong ?

Check if the local/remote connections have been enabled for ur instamce....Launcg SQL Server Surface Area configuration...Connections and services...Check Local and Network connections.....|||Looks like you are trying to connect a remote named instance. To make it work, SQL Browser on the remote server must be enabled, UDP port 1434 should be put into exception if firewall presents.|||

I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

THANKS IF ANY BODY SOLVE MY PROBLEM

|||

Naeem Sheikh wrote:

I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

THANKS IF ANY BODY SOLVE MY PROBLEM

Thnanks i wonder firewall is blocking my tcp/ip port and now i am connecting to the server|||Yes. It that is necessary.

error: 25 - Connection string is not valid -- HELP Please!

I have been having a problem trying to connect to a SQL Server. I have installed the Developer edition on an MS Small Business edition 2003 server

I also installed MS Sql Manager and I was able to create a database and connect to it. The database server is in the same PC. I used the surface configuration to enable remote connections using TCP /IP and pipe lines.

My application runs without a problem on my development machine but when I deployed on this server I get theprovider: SQL Network Interfaces, error: 25 - Connection string is not valid Error.

this is my config file setup

<connectionStrings>
<add name="Diamond_dbConnectionString" connectionString="Data Source=192.168.1.104\MSSQLSERVER;Initial Catalog=Diamond_db;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>

I have google and yahoo this error I found a lot of information I've tried many of them but still having the problem. I will appreciate your help solving this problem. I have a customer waiting since last week to see this site and I'm still stuck.

Tia

Charles

PS. Below I pasted the complete error info I get.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid)

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[SqlException (0x80131904): An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734995 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +820 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +162 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +107 DiamondTableAdapters.COUNTRIES_TEMPLATETableAdapter.GetContriesTemplate() +108[TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0 System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +296 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29 System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +482 System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +2040 System.Web.UI.WebControls.BaseDataList.GetData() +53 System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +284 System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +56 System.Web.UI.WebControls.BaseDataList.DataBind() +72 System.Web.UI.WebControls.BaseDataList.EnsureDataBound() +55 System.Web.UI.WebControls.BaseDataList.CreateChildControls() +63 System.Web.UI.Control.EnsureChildControls() +87 System.Web.UI.Control.PreRenderRecursiveInternal() +41 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

Do you have ISA running on the server? Can you connect through Server Manager to the server using the same credentials?

Jeff

|||

Jeff,

I'm using EMS SQL Manager for SQL Server

http://sqlmanager.net/products/mssql/manager/

to create and manage my SQL server. I can connect to the server using windows credentials but when I try with the ASP application I can't

Thanks

Charles

|||

Is the ASP.NET app using the same Windows account to access the database, or is it using the ASP.NET process account?

Jeff

|||

Jeff,

Honestly I'm very green regarding ASP.NET and MS-SQL Server

When I installed the server I asigned the Windows account to gain access to the SQL Server. When I created the database in question I also used the Windows Account.

When I registered the database with MS Server manager tool I also used the same Windows Account.

How can I check If I'm using the ASP.NET process account instead of the Windows Account?

I will appreciate your inputs.

Tia

Charles

|||

The ASP.NET process account, unless you have set it or changed it, is ASPNET or NETWORK SERVICE depending on operatiing system. It is unlikely you chose this account for access to SQL. But normally you would get a mdifferent error if that was the problem.

Take a look at connectionstrings.com for some possibilities in changing your connection string. You may want to use a standard authentication with SQL user and password rather than rely on a trusted connection.

Is your SQL on a different server than the web server? I wouldn't think so but you use the IP address of the SQL server in your connection. You should just need to enable TCP/IP, which you said you've done.

Jeff

|||Are you sure the MSSQLSERVER is the name of the named (not default) instance? It seems to be the SQL service name of default instance. If you're trying to connect to a default SQL instance on a remote server, just set the Data Source to the IP address of the remote server is ok.sql

Monday, March 19, 2012

error: 17194

I cannot use sql connection. This is my connection string

'Conn.Open "Provider=SQLNCLI;Database=dbname;Server=.\\MSSQLSERVER;UID=username;PWD=test123;"

The error message appears on browser is

Microsoft SQL Native Client error '80004005'

Client unable to establish connection due to prelogin failure

/Connect.asp, line 8

in SQL server ERRORLOG, it shows
Error: 17194, Severity: 16, State: 1.
The server was unable to load the SSL provider library needed to log in; the connection has been closed. SSL is used to encrypt either the login sequence or all communications....

How can I fix this error?

thanks

Are you using SQL Express DB? Normally, if u did install it with default settings the instance name is COMPUTERNAME\SQLEXPRESS

Second, assuming that your Server=.\\MSSQLSERVER is correct. Go to Management Studio and check if the UID has permission to login.

Third, check your Provider=SQLNCLI; if this is correct.

Cheers,

Glenn

|||In SSCM, it shows
SQL Server 2005 services:
- SQL Server Browser
- SQL Server (MSSQLSERVER)

So, I think the instance name is MSSQLSERVER

About the login, I am using Windows Authentication.
So,
- created an account in Computer Management
- add that account in SQL Express DB by Management Studio

what else do I need to do?

about the connection, I am using OLEDB, so I chose Provider=SQLNCLI. How can I check if it's error or not?

thanks

|||One thing I have noticed: when going to command promt, use this command
sqlcmd -S <servername> <<< this command is working

but
sqlcmd -S <servername>\MSSQLSERVER <<< this is not working. the error message is

"HResult 0x57, Level 16, State 1
SQL Network Interfaces: Connection string is not valid [87].
Sqlcmd: Error: Microsoft SQL Native Client: An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
Sqlcmd: Error: Microsoft SQL native Client : Login timeout expired"

Followed the below help without any luck
http://support.microsoft.com/default.aspx?scid=kb;en-us;914277

|||

Since you have done the KB atricle http://support.microsoft.com/default.aspx?scid=kb;en-us;914277 try to restart your workstation.

In your workstation, are you only using SQL Express 2005 or their is an existing MSDE 2000 or SQL 2000 ?

Go To SQL Server Configuration Manager make sure TCP-IP is enabled

Again go management studio--> Security-> Logins --> go to your windows user added previously and invoke its properties go to user mappnig to have acces on the database

Go to management studio --> security--> logins --> go to your windows user added previously and invoke its properties go to status and choose login--> enabled

|||Glenn,

I have switched authentication mode to mixed mode, then add a new sql user, and the db is working fine :) Not sure why windows authentication mode is not working, even I have done all above steps :(

anyways, thanks a lot for your time :)

cheers,

|||

Hi again...

Could you try this connection string

Data Source=SQLEXPRESSINSTANCENAME;database=YOURDATABASENAME;Integrated Security=True;

I guess this work this time. In my understanding using UID and PWD is for SQL user.

To check if the problem is really in your connection string or SQL Express, try to go to management studio and choose windows authentication mode if you can get through.

P.S. Hung Pham mind if i asked your msn id so that i can add you.

Cheers,

Glenn

Sunday, March 11, 2012

Error: 0xC001000E - connection not found

Hello,

Does anyone know what this error means and how to resolve it? I get this error when I attempt to run a Data Flow Task. The Data Flow Task has one subcomponent, a Flat File Source. I have set up the connection manager to access the flat file, which is on a local directory. I have tried everything to fix this. What could possibly be the problem?

Thanks

Error: 0xC001000E at : The connection "{B9E11DD7-21A1-4FD7-986F-6BDC5B81F51D}" is not found. This error is thrown by Connections collection when the specific connection element is not found.

K108 wrote:

Hello,

Does anyone know what this error means and how to resolve it? I get this error when I attempt to run a Data Flow Task. The Data Flow Task has one subcomponent, a Flat File Source. I have set up the connection manager to access the flat file, which is on a local directory. I have tried everything to fix this. What could possibly be the problem?

Thanks

Error: 0xC001000E at : The connection "{B9E11DD7-21A1-4FD7-986F-6BDC5B81F51D}" is not found. This error is thrown by Connections collection when the specific connection element is not found.

Go in and edit the flat file source - make sure it is pointing at the correct connection manager.

Out of interest, what is the point of a data-flow with only one component in it?

-Jamie

|||

I am just trying to test for now, that is why there is only one component. Why add more components when I can't even get the one to work correctly.

Anyways I resolved the problem... this error was occuring on a DTS migrated pkg. Apparently there are some ghost connections that are persisting, so by starting the pkg from scratch the problem has disappeared. This is my theory anyways.

|||

K108 wrote:

I am just trying to test for now, that is why there is only one component. Why add more components when I can't even get the one to work correctly.

Ah gotcha. That makes sense.

K108 wrote:

Anyways I resolved the problem... this error was occuring on a DTS migrated pkg. Apparently there are some ghost connections that are persisting, so by starting the pkg from scratch the problem has disappeared. This is my theory anyways.

This error most commonly occurs when you copy tasks/components from one package to another. I know that's not exactly what you've done but its not a huge jump from it. I guess that must be something to do with it.

Glad its fixed anyway.

-Jamie

|||

Yes, the problem (after much testing on my part) ALWAYS crops up when I am trying to run components from a migrated DTS package.

In this case, I have an EXECUTE SQL task, for which I've defined a NEW connection and deleted the old connection completely, and it still throws this error about the connection not existing, even though the sql runs correctly in the database.

I have found that the only solution to this problem is to start the package from scratch, and use the EXECUTE DTS 2000 PACKAGE object instead, instead of trying to run it from the migrated package itself.

Error: 0, Severity: 19, State: 0

While my production sql server was running, suddenly i got the error below and the connection was lost. Can anyone pls guide what is this error for, why this occured and how to resolve it. I got this error 2 times in two months.

Error: 0, Severity: 19, State: 0

SqlDumpExceptionHandler: Process 232 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.

I run SQL Server 2000 with SP4 with OS Win 2003. I found this error in event viewer. I am assuming that some procedure was running at this time.

Pls help me in troubleshooting this issue.

Help appreciated.

You've hit a bug of some kind - an access violation is an unexpected condition. You need to contact Product Support (http://support.microsoft.com/sql) to help figure out what happened and whether there's a fix available.

Thanks

Friday, March 9, 2012

Error, while connecting with SQL Server 2005 express edition

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact under the default settings of SQL SERver does not allow remote connections.
(provider:Named Pipes Provider, error: 40-Could not open a connection to SQL Server)

Hi,

Did you enabled setting to allow remote connection? Please see the blog for setup Remote connection

http://blogs.msdn.com/sqlexpress/

Hope that helps,

Lan

|||abrahampackiaraj
thank you, I already verified the tick mark in the check box of"allow remote connections" and I restarted the system. but this errorfollows up|||

did you manage to solve this problem as i have the same issue

Thanks

|||but while installing asp.net 2.0 , it doesn't even ask for that option. where from i can get that...|||whre from you got the option to tick the check box of "allow remote connections", i dont find that..|||

You can find it in SQL Server Surface Area Configuration. You may take a look at this post:

http://forums.asp.net/thread/1347652.aspx

Wednesday, March 7, 2012

Error with Report Manager

Hi,
"localhost/reportserver" is all right.
But With "localhost/reports" i have the following error:
--"The underlying connection was closed: The remote name could not be
resolved."
I have no more idea. Thanks !!Hello MIB,
Try accessing the Report Manager with https://<machinename>/Reports or
http://<machinename>/Reports
Peter Blackburn
www.sqlreportingservices.net
"MIB" <MIB@.discussions.microsoft.com> wrote in message
news:CB391524-0F0E-4FAB-A5D5-17467F120B02@.microsoft.com...
> Hi,
> "localhost/reportserver" is all right.
> But With "localhost/reports" i have the following error:
> --"The underlying connection was closed: The remote name could not be
> resolved."
> I have no more idea. Thanks !!|||Thanks for your helps.
I tried to access with the machinename, but it doesn't work.
I'm using Wondows Server 2003 (FAT 32 - It's stupid I know but i haven't
choose this configuration).
At the end of RS install, I had the following message : launch manually
report manager (How to do it?).
I need to access to the report mnager, i tried so many things and i have no
more idea.
"Peter Blackburn (www.sqlreportingservice" wrote:
> Hello MIB,
> Try accessing the Report Manager with https://<machinename>/Reports or
> http://<machinename>/Reports
> Peter Blackburn
> www.sqlreportingservices.net
> "MIB" <MIB@.discussions.microsoft.com> wrote in message
> news:CB391524-0F0E-4FAB-A5D5-17467F120B02@.microsoft.com...
> > Hi,
> > "localhost/reportserver" is all right.
> > But With "localhost/reports" i have the following error:
> >
> > --"The underlying connection was closed: The remote name could not be
> > resolved."
> >
> > I have no more idea. Thanks !!
>
>

Error with opening the connection

I have created my query to do what it needs to do but i'm getting error when i click the button, it says there is an error opening my connectiong...

I.E.

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Source Error:

Line 28: Line 29: //open the connectionLine 30: myConnection.Open();Line 31: Line 32: //create a command


Source File:c:\Documents and Settings\plan\PlanDatabase\BZAvuAdd.aspx.cs Line:30

Stack Trace:

[SqlException (0x80131904): Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +171 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2305 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +34 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +606 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +193 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +502 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +429 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +70 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +512 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +89 System.Data.SqlClient.SqlConnection.Open() +160 _Default.insertIntoVU() in c:\Documents and Settings\plan\PlanDatabase\BZAvuAdd.aspx.cs:30 _Default.addAppButton_Click(Object sender, EventArgs e) in c:\Documents and Settings\plan\PlanDatabase\BZAvuAdd.aspx.cs:127 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +98 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4919

therefor is this saying that I have to login before even testing this thing or what??

Can you post the rest of your connection code?

|||

yeah...if you want html let meknow

here is the c#

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using System.Data.SqlClient;

publicpartialclass_Default : System.Web.UI.Page

{

protectedvoid Page_Load(object sender,EventArgs e)

{

String parcel = (String)Session["parcelNumber"];

parcelNumLabel.Text = parcel;

}

protectedvoid insertApplicant()

{

//create the connection object

SqlConnection myConnection =newSqlConnection();

//set the connection string

myConnection.ConnectionString =ConfigurationManager.ConnectionStrings["MRDDstringConnection"].ConnectionString;

//open the connection

myConnection.Open();

//create a command

SqlCommand myCommand =newSqlCommand();//for data entry into applicant table

//***set the query text to the name of a stored procedure

myCommand.CommandText ="SELECT FirstName, LastName, Line1, Line2, City, State, Zip, PhoneNum FROM Applicant WHERE FirstName = @.fname, LastName = @.lname, Line1 = @.line1, Line2 = @.line2, City = @.city, State = @.state, Zip = @.zip, PhoneNum = @.phone";

/*

//***set the command type, stored procedure

myCommand.CommandType = CommandType.StoredProcedure;

*/

//create an input parameter

SqlParameter firstName =newSqlParameter();

firstName.ParameterName ="@.firstName";

firstName.SqlDbType =SqlDbType.Char;

firstName.Size = 10;

firstName.Value = ApplicantFirst.Text;//set the first name from text box

//create an input parameter

SqlParameter lastName =newSqlParameter();

lastName.ParameterName ="@.lastName";

lastName.SqlDbType =SqlDbType.Char;

lastName.Size = 20;

lastName.Value = ApplicantLast.Text;//set the last name from text box

//create an input parameter

SqlParameter line1 =newSqlParameter();

line1.ParameterName ="@.line1";

line1.SqlDbType =SqlDbType.Char;

line1.Size = 75;

line1.Value = ApplicantLine1.Text;//set the 1 line of address from text box

//create an input parameter

SqlParameter line2 =newSqlParameter();

line2.ParameterName ="@.line2";

line2.SqlDbType =SqlDbType.Char;

line2.Size = 75;

line2.Value = ApplicantLine2.Text;//set the 2 line of address from text box

//create an input parameter

SqlParameter city =newSqlParameter();

city.ParameterName ="@.city";

city.SqlDbType =SqlDbType.Char;

city.Size = 25;

city.Value = ApplicantCity.Text;//set the city from text box

//create an input parameter

SqlParameter state =newSqlParameter();

state.ParameterName ="@.state";

state.SqlDbType =SqlDbType.Char;

state.Size = 2;

state.Value = ApplicantState.SelectedItem;//set the state from text box

//create an input parameter

SqlParameter zip =newSqlParameter();

zip.ParameterName ="@.zip";

zip.SqlDbType =SqlDbType.BigInt;

zip.Size = 8;

zip.Value = ApplicantZip.SelectedItem;//set the zip code from text box

//create an input parameter

SqlParameter phone =newSqlParameter();

phone.ParameterName ="@.phone";

phone.SqlDbType =SqlDbType.Char;

phone.Size = 14;

phone.Value = ApplicantPhone.Text;//set the phone number from text box

//add the parameters

myCommand.Parameters.Add(firstName);//inserts first name into table

myCommand.Parameters.Add(lastName);//inserts last name into table

myCommand.Parameters.Add(line1);//inserts line1 of address into table

myCommand.Parameters.Add(line2);//inserts line2 of address into table

myCommand.Parameters.Add(city);//inserts city into table

myCommand.Parameters.Add(state);//inserts state into table

myCommand.Parameters.Add(zip);//inserts zip code into table

myCommand.Parameters.Add(phone);//inserts ohone number into table

//associate a connection with a command

myCommand.Connection = myConnection;

//execute the query

myCommand.ExecuteNonQuery();

//give back all resources

myCommand.Dispose();

myConnection.Dispose();

testlabel.Text ="Successful";

}

protectedvoid insertVofU()

{

//create the connection object

SqlConnection myConnection =newSqlConnection();

//set the connection string

myConnection.ConnectionString =ConfigurationManager.ConnectionStrings["MRDDstringConnection"].ConnectionString;

//open the connection

myConnection.Open();

//create a command

SqlCommand myCommand =newSqlCommand();//for data entry into Variance of use Table

//***set the query text to the name of a stored procedure

myCommand.CommandText ="SELECT BZAcaseNum, CurrentUse, ProposedUse, Comments FROM VarianceOfUse WHERE BZAcaseNum = @.caseNum, CurrentUse = @.current, ProposedUse = @.proposedUse, Comments = @.comments";/*

//***set the command type, stored procedure

myCommand.CommandType = CommandType.StoredProcedure;

*/

/*>>>>>

>>>>>>> //create an input parameter

>>>>>>> SqlParameter caseNum = new SqlParameter();

CaseNum caseNum.ParameterName = "@.caseNum";

>>>>>>> caseNum.SqlDbType = SqlDbType.Char;

>>>>>>> caseNum.Size = 10;

>>>>>>> caseNum.Value = ApplicantFirst.Text; //set the BZA Case Number Automatically

>>>>>>> */

//create an input parameter

SqlParameter current =newSqlParameter();

current.ParameterName ="@.current";

current.SqlDbType =SqlDbType.Char;

current.Size = 100;

current.Value = currentUse.Text;//set the current use from text box

//create an input parameter

SqlParameter proposedUse =newSqlParameter();

proposedUse.ParameterName ="@.proposedUse";

proposedUse.SqlDbType =SqlDbType.Char;

proposedUse.Size = 500;

proposedUse.Value = proposedUseText.Text;//set the proposed use from text box

//create an input parameter

SqlParameter comments =newSqlParameter();

comments.ParameterName ="@.comments";

comments.SqlDbType =SqlDbType.Char;

comments.Size = 500;

comments.Value = whyText.Text;//set the comments from text box

//add the parameters

//>>>>> myCommand.Parameters.Add(caseNum); //inherits BZA Case Number

myCommand.Parameters.Add(current);//inserts currentUse into table

myCommand.Parameters.Add(proposedUse);//inserts proposedUse into table

myCommand.Parameters.Add(comments);//inserts comments into table

//associate a connection with a command

myCommand.Connection = myConnection;

//execute the query

myCommand.ExecuteNonQuery();

//give back all resources

myCommand.Dispose();

myConnection.Dispose();

testlabel.Text ="Successful2";

}

protectedvoid addAppButton_Click(object sender,EventArgs e)

{

insertApplicant();

insertVofU();

}

|||

First, put some debug code in that checks your connection string:

ConfigurationManager.ConnectionStrings["MRDDstringConnection"].ConnectionString;

If this is null (meaning the connection string does not exist for your current application), this is something you will need to fix. Also, make sure it has a username/password.

The third thing to check is how you are logging in. If this is a SQL Server, you may have Mixed Mode Authentication turned off for the database. You might be able to log in fine using Windows Authentication Mode, but remote applications will not be able to access the database until Mixed Mode Authentication is turned on.

You can read more about it here:

http://support.microsoft.com/kb/889615

Hope this helps.

|||<addname ="MRDDstringConnection"connectionString="server = khazad-dum; database = mrdd3;"providerName="System.data.SqlClient"/>

</connectionStrings>

that is the HTML i used for creating the connection string is something wrong in there?

|||

i found the problem in my html.....didn't work at all so thanks for all the help you got me started in the right direction

|||

Text should be:

<connectionStrings> <addname="MRDDstringConnection"connectionString="Data Source=khazad-dum;Initial Catalog=mrdd3;Persist Security Info=True;User ID=<username here>;Password=<password here>"providerName="System.Data.SqlClient" />

</connectionStrings>

Once you have this in your web.config file, you'll need to make sure you have Mixed Mode Authentication turned on. In SQL Server 2005, you can do this by right-clicking the server, go to Properties, select Security, and make sure "SQL Server and Windows Authentication Mode" is selected.

** PLEASE NOTE: You will have to put a username and password in the connection string above.

|||

i put in the username and password and it doesn't work it says i can't login...i know the username and password are correct...where is it checking for the user name and password cause my administrators are idiots...and they don't know what they are doing so i'm trying to figure out this part....

|||

Check to make sure Mixed Mode Authentication is turned on. What are you using for a back-end? SQL Server 2005?

|||

yes...the back end is SQL server 2005, and mixed-mode is turned on...and i created my username in the enterprise manage and set the permissions to the owner of the db....withouth the username and password i had it successfully going through with no errors, but it wasn't writting so now once the database knows its my user name i will be able to write to it...i'm lost at this point

|||

Are IIS, the .NET Framework and the SQL Server all running on the same machine? If so, make sure you are using a login that exists on the SQL Server (open SQL Server Management Studio and look under Security -> Logins).

The only reason you should get a Login failed for user '(null)' is:
1) there was no login ID supplied
2) the login ID supplied does not exist as a SQL Server login
3) mixed mode authentication is off

If mixed mode authentication is on, and you are supplying a login ID, we should start looking at the existing logins under SQL Server.

|||

ok, when i go look in the Enterprise manager the login name I'm currently under (MIRKWOOD\plan) that is the login name that shows up on the logins page, now i don't have to include MIRKWOOD in the html portion becuase of the fact that MIRKWOOD is the server name...but i tried just regular (plan) i tried (MIRKWOOD\plan), i tried it with the password i use, and without the password i use...none of them work...i have no clue...and the mixed mode authentication is on....also in the security tab it says "Audit Level" - "None" checked, "Ownership Chairing" - not checked, "Start and Run SQL server in the following account" - its a totally different user name and password i've seen....is that where the problem is?? maybe this will help you...sorry for being a hassel...i've just never delt with this before

|||

Put this in your web.config file (replace your old connection string):

<addname="MRDDstringConnection"connectionString="Data Source=<servername here>;Initial Catalog=<database name here>;Persist Security Info=True;User ID=<username here>;Password=<password here>"providerName="System.Data.SqlClient" />

You will have to change the Uesr ID and Password to a login you know exists.

I have to admit I am a bit confused. Earlier, it looked like you were trying to connect to a server named "khazad-dum" (neat Babylon 5 reference, by the wayCool) and a database named "mrdd3", but now it appears you are trying to connect to a server named "MIRKWOOD" and a database named "plan".

The User ID and Password would be the login as it exists in SQL Management Studio.

|||

I am trying to connect to a server name Khazad-Dum...that is where SQL server is located and my database...but my user name and password come from this other server name mirkwood....when i look in the security tab and then logins there is one under there called "MIRKWOOD\plan" now i'm almost 100% positive that is my login name but when i put it in my code it says that the name does not exist..really wierd...and my admin has no clue how he names stuff so i'm stuck here trying to figure this out...ughhh...if you have anymore suggestions that would be great...thanks for the help you have provided so far i understand everything you are saying and how it goes...i'm assuming it is the naming sequence...

|||

I am trying to connect to a server name Khazad-Dum...that is where SQL server is located and my database...but my user name and password come from this other server name mirkwood....when i look in the security tab and then logins there is one under there called "MIRKWOOD\plan" now i'm almost 100% positive that is my login name but when i put it in my code it says that the name does not exist..really wierd...and my admin has no clue how he names stuff so i'm stuck here trying to figure this out...ughhh...if you have anymore suggestions that would be great...thanks for the help you have provided so far i understand everything you are saying and how it goes...i'm assuming it is the naming sequence...in fact here is the html i'm using now...and still getting the error...

<addname="MRDDstringConnection"connectionString="Data Source=KHAZAD-DUM;Initial Catalog=mrdd3;Persist Security Info=True;User ID = \mirkwood\plan; Password=********"

providerName="System.Data.SqlClient" />