Reuse Existing Connection String For TableAdapter?

Jan 25, 2008

I've added a typed DataSet and dragged a table across from the server explorer. When I click configure on the table adapter, then click previous back to the "Choose Your Data Connection" dialog. The only option is the new connection that was just created when I added the sql server to the server explorer. Is there anyway to reuse my existing web.config connection string? My goal is to have a single connection string in my web.config.

 Thanks.

 -David

View 3 Replies


ADVERTISEMENT

How Can You View The Connection String Of An Existing Datasource? How Do You Delete Existing Dataset?

Nov 14, 2007

I went to look at the connection string previously entered for a dataset created in a new report, and am not seeing anything intuitive for bringing up the associated datasource dialog box that was used to enter name, type and connection string. I'm also noticing nothing intuitive for deleting an existing dataset. How do you do these two very simple things in an existing project? I dont see the dataset in solution explorer, I see it only in the text box on the data tab and in a limited kind of way on the dataset view where the columns show and maint is allowed mostly on the columns only. I tried hilighting the dataset here and hitting the delete key to no avail.

View 1 Replies View Related

Power Pivot :: How To Modify Existing Workbook Data Connection String

Oct 29, 2015

Trying to modify the workbook connection string but it is greyed out and unable to change the Provider= from SQLNCL10 to SQLOLEDB.  I am able to change the PowerPivot Data Connections connection string but not the workbook connection string.  On the forum only see where people have asked the question but it seems like the people who've asked ended up recreating the data models.

View 5 Replies View Related

Connection Manager Reuse For Oracle And SQL Databases

May 2, 2008

I'm trying to implement a configurable way of executing a group of SQL statements using either an Oracle or SQL database as the source for the data.

I'm currently building a connection string with a Script Task and then assigning it to a package variable so that it can be used by a connection manager but this only works with a SQL OLEDB connection.


I'm holding all the connection details in a database table, hence the need for the scripting but would it be possible to extend the task to reuse a single connection manager by changing it's properties?

View 7 Replies View Related

TableAdapter And Connection Strings

Sep 19, 2007

Hello,
I'm trying to setup a typed dataset with a table adapter in .NET 2.0, and the problem I am having is that I cannot get the table adapter to use existing connection strings setup in the web.config file.  How can I get it to do so?  It doesn't see the connection strings, and so it wants me to create a new connection, which I don't want to do.

View 2 Replies View Related

ADO Connection Pooling Error: The Client Was Unable To Reuse A Session With ...

Apr 13, 2006

Hello,

We are running SQL2K5 and have a Web server with a family of sites all sharing an identical connection string to enable ADO connection pooling between them. Today for about 20 minutes we had several (all?) connections from one site that uses a specific DB get a connection reuse error which showed in out SQL logs:

DESCRIPTION: The client was unable to reuse a session with SPID #, which had been reset for conection pooling. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.

We also have SQL Server slowdown and log in problems from other applications that seemed a symptom of this, or some third unknown cause. Note, the # means the run-time spid number was inserted. The misspelling "conection" comes right out of sys.messages (it is not our custom error):

select top 10 * from sys.messages where message_id = 18056

The immediately preceeding error in the SQL Log was always:
Message
Error: 18056, Severity: 20, State: 29.

Where Severity and State vary, but "Error: 18056" is consistent, although I can find no documentation on "Error: 18056" through Google or MSDN.

Also, the "The client was unable to reuse a session ..." error seems not to be referred to anywhere.

In our IIS logs, the matching entries are of the form:

[DBNETLIB][ConnectionRead (recv()).]General network error. Check your network documentation.

and

Invalid connection string attribute


My questions: Does anyone have experience with this error? We have real good history with ADO connection pooling, but can a "bad" connection be pooled, and if so can it be "flushed" or the pool "drained"?

Thank you for anything you have to offer!



View 13 Replies View Related

Reuse Existing Data Flow Components In A Custom Data Flow Component

Aug 29, 2007

Hello,

Is it possible to use existing data flow components (Merge Join, aggregation,...) in a custom data flow component?

Thanks,

Yoann

View 15 Replies View Related

Cannot Set Connection Property Of Backup Database Task If Connection String Is Customized In Connection Object

Aug 23, 2006

I added a connection (ADO.NET) object by name testCon in the connection manager - I wanted to programmatically supply the connection string. So I used the "Expressions" property of the connection object and set the connectionstring to one DTS variable. The idea is to supply the connection string value to the variable - so that the connection object uses my connection string.

Then I added a "Backup Database Task" to my package with the name BkpTask. Now whenever I try to set the connection property of BkpTask to the testCon connection object, by typing testCon, it automatically gets cleared. I am not able to set the connection value.

Then after spending several hours I found that this is because I have customized the connection string in testCon. If I don't customize the connection string, I am able to enter the "testCon" value in the connection property of the BkpTask.

Is this an intrinsic issue?

View 2 Replies View Related

20 Sa Existing Connection

Sep 9, 2007



On executing the DMV dm_exec_session we got 20 connection by user sa.
On futher invetigation we got the below result for user sa


1 BACKGROUND sa . . NULL RESOURCE MONITOR
2 BACKGROUND sa . . NULL LAZY WRITER
3 SUSPENDED sa . . NULL LOG WRITER
4 BACKGROUND sa . . NULL LOCK MONITOR
5 BACKGROUND sa . . master SIGNAL HANDLER
6 sleeping sa . . master TASK MANAGER
7 BACKGROUND sa . . master TRACE QUEUE TASK

8 sleeping sa . . NULL UNKNOWN TOKEN
9 BACKGROUND sa . . master BRKR TASK
10 SUSPENDED sa . . master CHECKPOINT
11 BACKGROUND sa . . master TASK MANAGER
12 BACKGROUND sa . . master BRKR EVENT HNDLR
13 BACKGROUND sa . . master BRKR TASK
14 BACKGROUND sa . . master BRKR TASK
15 sleeping sa . . master TASK MANAGER
16 sleeping sa . . master TASK MANAGER
17 sleeping sa . . master TASK MANAGER
18 sleeping sa . . master TASK MANAGER
19 sleeping sa . . master TASK MANAGER
20 sleeping sa . . master TASK MANAGER
21 sleeping sa . . master TASK MANAGER




I do not understand why sa use to keep there connection.

Canu please help letting me know why sa keep these connections.

Regards
Sufian

View 3 Replies View Related

The Connection Name 'LocalSqlServer' Was Not Found In The Applications Configuration Or The Connection String Is Empty.

Sep 27, 2007

Hi,
I'm having a BIG problem, this is my 3rd day looking for answer !I'm trying to create a custom membership provider with MS SQL database 2005 but not the default ASPNETDB. I've changed the web.config to be as following:<connectionStrings><add name="sqlConn" connectionString="Data Source=.;Integrated Security=True;Initial Catalog=ASPNETDB;"providerName="System.Data.SqlClient" /></connectionStrings> <system.web><trace enabled="true" /><roleManager enabled="true" /><authentication mode="Forms" />
<membership defaultProvider="MySqlProvider"><providers><remove name="AspNetSqlProvider"/><add name="MySqlProvider" connectionStringName="SqlConn" type="System.Web.Security.SqlMembershipProvider" applicationName="/" /></providers></membership>
But when I try to login to the site using the login control the following error occurs:
Server Error in '/etest' Application.


Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.Source Error:



Line 149: <roleManager>
Line 150: <providers>
Line 151: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 152: <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 153: </providers>Source File: C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Configmachine.config    Line: 151


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.213
 It is clear that this is a prblem with my Machine.Config file - since I've "worked!" on this file for a while. But when I've checked the Machine.config file I've found the LocalSqlServer connection it is talking about! .
I'm lost and I dunno what to do, can anyone help?
Here is the mahine.config in case if you need it:<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=.;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /></connectionStrings>
<system.data><DbProviderFactories>
<add name="Odbc Data Provider" invariant="System.Data.Odbc" description=".Net Framework Data Provider for Odbc" type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /><add name="OleDb Data Provider" invariant="System.Data.OleDb" description=".Net Framework Data Provider for OleDb" type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add name="OracleClient Data Provider" invariant="System.Data.OracleClient" description=".Net Framework Data Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /><add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /></DbProviderFactories>
</system.data><system.web>
<processModel autoConfig="true" /><httpHandlers />
<membership><providers>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" /></providers>
</membership><profile>
<providers><add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers></profile>
<roleManager><providers>
<add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /><add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers></roleManager>
</system.web>

View 8 Replies View Related

Data Access :: JDBC Connection Is Not Using Username Passed In Connection String

Sep 16, 2015

I am using sqljdbc41.jar to connect with MSSQL database, it is working fine on my local machine.Where as on the remote server, same class giving me error

Login failed for user '<domain><windows loginID>'
My connection string is URL...

I am using sqljdbc41.jar  and on 64 bit processor , I am using following command which included path for sqljdbc_auth.dll java -Djava.library.path= C: sqljdbc_4.1enuauthx64 TestDao and error is Login failed for user '<domain><windows loginID>' why it is not picking up username passed in connection string. I have 2 machines, one is local and other is remote. on both machine I login using my domain, it is working absolutely fine on local then why the error is coming on remote machine.Both the machines are identical.

View 4 Replies View Related

The Connection Name 'name' Was Not Found In The Applications Configuration Or The Connection String Is Empty

Jan 18, 2008

I have been trying to host my website on Go Daddy for about 3 weeks and I have cleared several problems but this one remains. I can get into the ASPNETDB database for doing logins , etc but I cant access my database called "PINEmgt".
To try to understand where the problem is located,I built a very simple application without login controls and put on it one Detailform accessing a single line table "Signin". I continually get the error message I got with my real app :"The connection name 'PINEMgtConnectionString2' was not found in the applications configuration or the connection string is empty. " There is only one connection string in my app -'PINEMgtConnectionString2'. When I run the app locally on my machine it works. After I move everything to Go Daddy, I get the error message and the following dump"





Line 24: </Fields>
Line 25: </aspetailsView>
Line 26: <aspqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStringsINEMgtConnectionString2 %>"
Line 27: InsertCommand="INSERT INTO Signup(first_name, last_name, email, customer_id) VALUES (,,,)"
Line 28: SelectCommand="SELECT * FROM [Signup]"></aspqlDataSource>

This is indeed the code from my single page app.

The dump is:




[InvalidOperationException: The connection name 'PINEMgtConnectionString2' was not found in the applications configuration or the connection string is empty.]
System.Web.Compilation.ConnectionStringsExpressionBuilder.GetConnectionString(String connectionStringName) +3039085
ASP.default_aspx.__BuildControlSqlDataSource1() in d:hostinguck7scoutDefault.aspx:26
ASP.default_aspx.__BuildControlform1() in d:hostinguck7scoutDefault.aspx:10
ASP.default_aspx.__BuildControlTree(default_aspx __ctrl) in d:hostinguck7scoutDefault.aspx:1
ASP.default_aspx.FrameworkInitialize() in d:hostinguck7scoutDefault.aspx.vb:912306
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +40
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) +29
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +303
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


After Googleing, asking Go Daddy for info (which they dont give) , etc for three weeks, I need serious mental help
in the form of a solution of this problem. Your help with the problem or the name of a good mental health professional in eastern N.C. (maybe both) would be appreciated.

View 10 Replies View Related

The Connection Name 'name' Was Not Found In The Applications Configuration Or The Connection String Is Empty

May 30, 2008



I have seen another thread with this same problem, but the problem seemed to be a typo. I am getting an error when I try to access the web site ..


The connection name 'USASH-AS0013' was not found in the applications configuration or the connection string is empty.

However, in my web.config file I do have a connection named USASH-AS0013. Here is my web.config file (with my user/pwd hidden). Any help would be greatly appreciated.



<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
WindowsMicrosoft.NetFrameworkv2.xConfig
-->
<configuration>
<appSettings/>
<connectionStrings>
<add name="USASH-AS0013" connectionString="Provider=SQLOLEDB;Data Source=USASH-AS0013;User ID=****;Password=*****;Initial Catalog=&quot;Smart Factory&quot;"
providerName="System.Data.OleDb" />
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.

Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<compilation debug="true" strict="false" explicit="true"/>
<pages theme="MySkin" >
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>

View 3 Replies View Related

SQL Server 2008 :: Connection Manager Not Using Connection String Value

Feb 19, 2015

I have a child package where the ConnectionString property of a Connection Manager is set by a Parent Package Variable Configuration. I set up a script task that brings up a message box with the value of the ConnectionString property right before the dataflow task.

MessageBox.Show(Dts.Connections["CPU_*"].ConnectionString.ToString());When I run the parent package, the message box shows that the connection string is changing with every iteration, but in the dataflow it always draws the data from the same source.

The connection manager is an ADO.Net type, RetainSameConnection is set to False, and I've been researching this for days.

(Update 2/23/2015): To make this stranger, when I look at the diagnostic logs, they tell me that when the new connections are being opened they are using the new connection strings.

View 2 Replies View Related

Cannot Set Connection String For Bulk Insert Source Connection

Jan 4, 2006

I came across something strange today. I was wondering I was doing something wrong.

View 7 Replies View Related

Edit Connection Manager Connection String At Runtime With C#

Jul 3, 2007

This is the first time I have used SSIS, so please bear with the ignorance.



I have a super simple package that inserts x000's of rows into a temporary table. The data source is a file that the user will upload. I need to be able to tell the package what file to upload. I'm thinking the simplest thing would be to edit the connectionString property of the SourceConnectionFlatFile at runtime. Is this possible? What form should the file path be in (UNC, other)? And, are there any other considerations I should be aware of?



Thanks!

View 1 Replies View Related

An Existing Connection Was Forcibly Closed By Remote Host

Jun 26, 2007

Hi all
I have run a stranger issue:
I use ADO.NET 2.0 to access sql2000 database. during the whole process, I need stop sql server service which the program is connecting. my setup is like following:
1.Open a conection to access table and then close the connection;
2.restart sql server service ;
3.Re-open a connection to access table and then an exception was thrown out:
 A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed bythe remote host.)
4. try re-open a connection to access table and then no exception was thrown out.
I think this maybe related with connection pool. any guy know the detail, please give me a response. Thank you very much!
 

View 2 Replies View Related

An Existing Connection Was Forcibly Closed By The Remote Host

Feb 13, 2006

Hi,
I'm running a website using MSSQL 2000. Sometimes (not always) I get this error message on the website:
A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
I have also websites running with MySQL and those don't have this problem.I searched google but I couldn't find usefull information on this problem.
Someone who knows what's going on here ?

View 1 Replies View Related

TCP Provider, Error: 0 - An Existing Connection Was Forcibly Closed By The Remote Host

Apr 29, 2006

We are getting a problem when the below error Log

Server: SQL Server 2005 and SP1.



Then, All the Web Servers will drop all connections and stop the network service. Later, the network service will start up automatically but all the before service is dropped.

We would like to know the error coming from?



Error Log

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

TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host



Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 4/29/2006
Time: 10:48:47 AM
User: N/A
Computer: 88DBWEB0
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 4/29/2006 10:48:47 AM
Event time (UTC): 4/29/2006 2:48:47 AM
Event ID: 77910e6688484582bb1c29808feef883
Event sequence: 128
Event occurrence: 13
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/24978983/Root/ph-3-127907437121075328
Trust level: Full
Application Virtual Path: /ph
Application Path: D:DB88ph
Machine name: 88DBWEB0

Process information:
Process ID: 1568
Process name: w3wp.exe
Account name: NT AUTHORITYNETWORK SERVICE

Exception information:
Exception type: SqlException
Exception message: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

Request information:
Request URL: http://88db.jobsdb.com/ph/Views/MediaUpload.aspx?PostID=50202&Type=I&panelid=postimagediv
Request path: /ph/Views/MediaUpload.aspx
User host address: 192.168.10.10
User: 50077
Is authenticated: True
Authentication Type: Forms
Thread account name: NT AUTHORITYNETWORK SERVICE

Thread information:
Thread ID: 15
Thread account name: NT AUTHORITYNETWORK SERVICE
Is impersonating: False
Stack trace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.WriteSni()
at System.Data.SqlClient.TdsParserStateObject.ExecuteFlush()
at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at System.Web.SessionState.SqlSessionStateStore.DoGet(HttpContext context, String id, Boolean getExclusive, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags)


Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


View 10 Replies View Related

Framework 2.0 Changes - TCP Provider, Error: 0 - An Existing Connection Was Forcibly Closed By The Remote Host.

Nov 14, 2005

If you connect to a server and open a query in SQL Managment studio (2005) and looses connection and then regain the connection, when you try to run the query it gives me a "TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host."   This happens against both 2005 and 2000 servers.   If I re-run the query it works.   However, this happens in our VB.NET app as well for clients with Wireless connections.   So, something has changed in Framework 2.0 regarding this, does anyone know how to tell the client to not throw this error and just try connecting the server instead which will work?  

View 105 Replies View Related

Variable Connection String For OLE DB Connection

May 15, 2007

Good Morning,



I hope that I am just missing a step in the process somewhere. I have established a string variable called DatabaseServer and another called DatabaseName. In the OLE DB connectionstring expression I have the following:




Code Snippet

"Data Source=" + @[User::DatabaseServer] + ";Initial Catalog=" + @[User::DatabaseName] + ";Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;"



My understanding is that changing the variable from SERVERA to SERVERB should repoint the connection. (Test to pre-production to production in my current promotion environment.) This should also take effect in any dataflow task using the database connection above right? When I try to repoint the server variable (and only the server variable) I am either a.)throwing errors saying the original connection cannot be found in the data flow task, or b.)the job appears to be processing fine, but the repoint did not take place and data is still flowing to the original server.



Can anyone offer suggestions as to what I am missing?



The properties values in the DB connection:

ConnectionManagerType is OLEDB

DataSourceID is blank

DelayValidation is False (Setting to true changes nothing in my test)

Expression for ConnectionString is (see above)

RetainSameConnection is False

SupportsDTCTTransactions is True (and appears to be unchangeable.)

View 7 Replies View Related

An Error Occurred While Receiving Data: '10054(An Existing Connection Was Forcibly Closed By The Remote Host.)'.

Jan 3, 2006

What does this error mean? I get this in the transmission_status column of  sys.transmission_queue

An error occurred while receiving data: '10053(An established connection was aborted by the software in your host machine.)'.

Also, does the number in this message correspond to error 10053 in sys.messages?

Thanks

 

 

 

View 3 Replies View Related

Log Reuse Help

Apr 30, 2007

Dear Folks,
I'm getting the error with application like this..............

"the transaction log for database "mydatabase" is full.....to find out why space in the log can not be reused, see the log_reuse_wait_desc column in sys databases. "

I've checked with the column, there are totally 3 options.(I've checked with all other databases)
1)checkpoint,
2)log_backup,
3)nothing

what can i choose for this error to be suppressed?
actually there was log_backup option.

please guide me in this regard.........

thanks in advace.

Vinod

View 1 Replies View Related

How Do I Reuse A SqlDataAdapter

Apr 25, 2007

It's a pretty basic question but I haven't been able to find any examples out there.  I dimmed a dataadapter and would like to reuse later in my code (line 3 in the code below).  What is the correct syntax to do this? Dim da As New SqlDataAdapter("SELECT * FROM myTable", conn)da.Fill(myDataTable)da.______  ("SELECT * FROM myTable2", conn)da.Fill(myDataTable2) 

View 2 Replies View Related

Can We Reuse SqlParameter's?

Jul 10, 2004

Hi,

I am getting the following error:

The SqlParameter with ParameterName '@pk' is already contained by another SqlParameterCollection

If I could work out what code to post I would, but I can say that I am managing my Sql data in my code by caching small arrays of SqlParameter objects as pulled from the database. If I need to update the DB I change the cached SqlParameter and re-insert it. If I perform a SELECT I check the cache first to see if I already have the SqlParameter.
However, currently, I am experiencing the above error when performing a select, then later an update, followed by another update.
Would I be correct in saying that a SqlParameter object can only be used once for a database operation and should be discarded? Would I be correct if I said that the SqlCommand object should be discarded? I am barking up the wrong tree entirely?

Distressed in DBLand,
Matt.

View 2 Replies View Related

How Can I / Should I Reuse SqlCacheDependency? Thanks

May 1, 2006

I can create a SqlCacheDependency, and link it to a cached item in httpcontext cache. When something change, it will remove the cached item from the cache. I think I have to redo the process when that happens - prepare sql command, create SqlCacheDependency and insert the item into cache. Now I only need a notification from my SQL when something changes in one of my table, I don;t need read anything from db, and I think I should find a way to not recreate the SqlCacheDependency object everytime?
any suggestion?

View 2 Replies View Related

Reuse Deleted Primary Key Id

Dec 15, 2007

Hello,          Can I reuse the deleted primary key id? I'm using SQLServer2005. cheers,imperialx   

View 6 Replies View Related

Reuse Calculated Values

Nov 14, 2006

What is the best code pratice to use do the following code,

SELECT
fo.no as LNum,
fo.name as LName,
sum(CASE fo.docnome WHEN "In" THEN fo.etotal ELSE 0 END) as In1,
sum(CASE fo.docnome WHEN "In2" THEN fo.etotal ELSE 0 END) as In2,
sum(In1+In2)/10 as inDec,
from fo group by fo.no,fo.name order by fo.name

instead of

SELECT
fo.no as LNum,
fo.name as LName,
sum(CASE fo.docnome WHEN "In" THEN fo.etotal ELSE 0 END) as In1,
sum(CASE fo.docnome WHEN "In2" THEN fo.etotal ELSE 0 END) as In2,
((sum(CASE fo.docnome WHEN "In" THEN fo.etotal ELSE 0 END))+sum(CASE fo.docnome WHEN "In2" THEN fo.etotal ELSE 0 END)))/10 as inDec,
from fo group by fo.no,fo.name order by fo.name

I cant use functions and procedures. Is there any better and cleaner way to code this, reusing the calculated values?

View 1 Replies View Related

Stored Procedure Reuse

Jul 23, 2005

I wonder if there is a solution for this in SQL 2000 (or do I have towait for SQL 2005)?I am currently in the middle of developing a 'Yahoo' style portal whichwill be rolled out in about 20 or so countries. I have set up in SQLServer one database per country. All the portals have the samefunctionality - but show different data.Is it possible to have a single database which holds storedproceedures, functions and views and have the individual countrydatabases use these?Note: I want to avoid using EXEC sp_executesql.I look forward to some good news on this! Thank you in advance.Dadou.

View 2 Replies View Related

Cannot Reuse Database Name After Deleting Old One

Apr 19, 2008



Hi. I'm starting to try out LINQ to SQL, and so I'm using SQL Express (on Vista) to experiment. My problem is that once I create and delete a database, I can never use the name again. If, after deleting the old database, I try to create another one with the same name (say Acct1), I get "Create failed for Database 'Acct1'. An exception occurred while executing a Transact-SQL statement or batch. The logical file name "Acct1" is already in use. Choose a different name. Error: 1828"

I am trying to create the database in SQL Server Management Studio Express. That database name does not appear in the list of databases: there is only AdventureWorks and the system databases. The .MDF and .LDF files have been deleted. Not just sent to the recycle bin, but permanently deleted.


I have already used up Acct1, Acct2, and Acct3, just to try out different scenarios. Each time, I delete the old database before trying to create a new one with the same name, but I am forced to always supply a new, different name. I have checked the directory with hidden files and system files showing to be sure there is no old file lurking there somewhere.


Is there a way to delete these old "logical file names"? I can't even find any reference to their existence except for the message that says they are already in use.

View 11 Replies View Related

Transact SQL :: How To Reuse Subquery

Jul 29, 2015

with c1 As (
select 1 As '1' , 2  As '2' , 3 As '3'

, c2 As (
select 4  As '4', 5  As '5',  6 As '6'
union all
select 1 , 2 ,3 from c1  -- >>>>>  select from c1 here 
) select * from c2 
  union all
  select * from c1 -- >>>>>> and select from c1 here 

According to the query above , I try to reuse the subquery by put  the subquery into 'with cte'  name (c1)  then i select this  2 times .

if I do this way , how many time this subquery (c1) execute ?
if 1 time then this is the right way to reuse this subquery .
if 2 times  , it is not then what should i do to reuse this subquery ?

View 3 Replies View Related

Reuse Of Conversation Handles

Nov 26, 2007



I have read the articles posted online concerning different dialog reuse strategies. Most of them create a new table in the sender to hold dialog ids. I was wondering what is wrong, if anything, with the following approach:




Code Block
declare @dlg uniqueidentifier
select top 1 @dlg = conversation_handle from sys.conversation_endpoints where state IN ('CO')
if @dlg is null
begin
begin dialog conversation @dlg
from service [tcp://SFT3DEVSQL01:4022/TyMetrix360Audit/DataSender]
to service '//TyMetrix360Audit/DataWriter','386DDD04-7E55-466A-BE83-37EFC20910B9'
on contract [//TyMetrix360Audit/Contract] with encryption = off;
end
;send on conversation @dlg
message type [//TyMetrix360Audit/Message] (@msg)





Here I simply select a conversation handle directly from the sys.conversation_endpoints table. Can anyone see any issues with this approach?

Thanks in advance....

View 6 Replies View Related

Reuse Of Field Aliases

Jan 3, 2007

I have been working with SQL for quiet a while but think this perhaps is a very basic question that has always escaped me:

At my work I was exposed to both, MS SQL Server 2000 and Sybase Adaptive Server Anywhere/Sybase SQL Anywhere.

Under Sybase I was able to use aliases in other calculations and filters but i have never been able to do the same with SQL.

Example:
In Sybase I can write this:

Select Price * Units as Cost Cost * SalesTax as TotalTaxFrom Invoice Where TotalTax > 3.5
However if i want to do this in MS SQL 2000 i have to go trough


Select
Price * Units as Cost
Price * Units * SalesTax as TotalTax
From Invoice
Where (Price * Units * SalesTax) > 3.5

In the long run this is costing me a lot of code redundancy, not to mention a debugging nightmare. Is there a way to replicate this alias usage in MS SQL Server?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved