At What Throughput Should I Leave A Connection Open ?

Feb 3, 2005

I am used to writing applications that hit the database "every so often" and am happy with opening and closing the connection to SQL Server for each one.





I am now writing an application that monitors a table where rows are written to it by a 3rd party application at possibly several rows per second. My job is to "pickup" those rows, analyse the data and move them to different tables. This will be done with a timer which is currently set to tick every second.





My question is: At what stage should I start to think about keeping open a permanent connection to the database ?





1 row per second ?





100 rows per second ?





Any suggestions appreciated.





Steve.

View 2 Replies


ADVERTISEMENT

Leave The Connection Open Or Always Open And Close Immediately?

Jun 7, 2006

Hi there,
 
I got an approach like that:
1) Read something from DB - check the value, if true stop if false go on2) Read the second Value (another SQL Statement) - check the value etc.
Now I could open the connection at 1) and if I have to go to 2) I leave the connection open and use the same connection at 2). Is it ok to do that?
The other scenario would be opening a connection at 1), immediately close it after I read the value and open a new connection at 2).
Thanks for the input!

View 4 Replies View Related

Leave DB Connection Open

Mar 20, 2008

Hello, I have always closed my db connections asap after opening them and have always thought this was the best practice.  But now I am wondering if I can just leave the connection open.
I created a windows service which runs on a timer and executes every 5 seconds.  The problem is that the code takes longer than that to process and the code may be executing three times at once. Im worried that since I use the same connection each time the code executes that a connection opened by the first run through may be closed or reopened by the second or third running of the code resulting in an error.  The connection is opened and closed about 10 times each time the timer event fires.  Should I open the connection once and leave it open when the service is started and close it when it is stopped or on any error?
 
Thanks

View 2 Replies View Related

Is It Bad Practice To Leave A SqlCeConnection Open Through The Duration Of A Mobile Application?

Jan 24, 2008

I know that with traditional SQL systems, it is important to only open connections to a sql server when they are needed. However, since there is no "server" in mobile apps, is it bad practice to leave one open throughout the duration of an application?

The application is going to be constantly reading and writing to the data tables and it seems like it might be a good idea to leave it open.

Thanks!

View 1 Replies View Related

ExecuteReader Requires An Open And Available Connection. The Connection's Current State Is Closed.

Apr 26, 2007

I am accessing SQL2005 with C# code using OleDbConnection.



A try and catch block catches the following error once a while between the Open() and Close() of the connection:

ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.



I do not even have any idea where to start to debug this. The ExecuteNonQuery() runs a delete SQL query. It works 99.9% of the time. I do not see anything wrong when this error happens.



Any hint would be greatly appreciated.



View 9 Replies View Related

Open An ODBC Connection To A DB And Must Use A Connection That Looks Like This: DSN=myDSNname.

Dec 11, 2006

In my ssis package,

I have a DSN connection like this: "DSN=myDSNname". Which decide from i have to pull the data.

By using OLE DB Source Editor, I want to assign that ODBC Connection to it.

By data source Reader i can achive this but where i have to pass the hard-code SQL Query that i don't want.

i'm using the variable for dynamic SQL command.

Thanks.

Manoj

View 5 Replies View Related

Backup Slow Throughput

Nov 16, 2006

Hi Team,

I have a SQL 2000 instance with 46 Databases (all databases put together will be 15 GB in size). I am running a SQL Backup using a third party software.

My full backup of the SQL instance which backs up 15 GB of data finishes within 30-45 minutes. But, my differential backup of the same instance which backs up only 150 -250 MB of data takes 12 hours to backup.

I found a knowledge article from MS Support site which says, differntial backup would take more time than full in few scenarios.

http://support.microsoft.com/default.aspx?scid=kb;en-us;196658

But the above document is for SQL 7.0. Will it be the same for SQL 2000 and 2005 too? If yes, can you please tell if I can increase the speed of differential backup in my environment. Should I modify any SQL Parameters?

Please let me know your thoughts on this..

Thanks
Santhosh

View 4 Replies View Related

Capturing Component Throughput

Dec 19, 2007

[Microsoft follow-up]

I've just been reading this thread by a guy asking about capturing the throughput of a dataflow. I suggested that there is no real notion of capturing throughput of a dataflow but I believe there IS a notion of capturing the throughput of a component or an execution tree.

I believe all the information that one would need to capture the throughput of a component (apart from the name of the component that is) is available in the OnPipelineRowsSent event. If there were a OnPipelineRowsSent eventhandler and the OnPipelineRowsSent event contained the name of the component then I think we would be able to capture the throughput of a component. So, some questions:


Why is there no eventhandler for the OnPipelineRowsSent event?

Can the name of the component be added to the information in the OnPipelineRowsSent event?

Following on from this... I once had a conversation here with Kirk Haselden about capturing pipeline throughput. He thought it was a good idea and suggested I raised a DCR for it which I did but that was in the old pre-Connect days and it seems as though that DCR (like SO many other things) didn't make it across to Connect. So, some more questions:

Can you find any Connect DCRs relating to capturing throughput? I've found this: https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=152162 that I raised 18 months ago but which hasn't even had a single comment from anyone at Microsoft.

Do you think that capturing throughput would be useful? I can foresee huge advantages by capturing this in the debugger. (Note that Informatica does this and has done for years. It has a very nice GUI that shows the throughput of each destination in the mapplet.)
I'd welcome any thoughts around this. Its a big ask and it fits in very nicely with my constant, nay INCESSENT, requests for debugging enhancements so maybe this is one for Darvey to have a read of???

Thanks
Jamie

View 16 Replies View Related

Boilerplate Activation SQL For High-throughput

Apr 9, 2007



OK, so assume I am recycling dialogs in my client code, and assume I am doing something similar to get a dialog handle in my TSQL. What should the activated stored procedure that is processing my queue look like if I am expecting thousands of messages per second? Assume also that there is a small bit of logic need to process each individual message? I am building for a high-throughput scenario and would like to get as much as possible out of each second-tier service broker server as possible before the aggregated data is moved up the chain to a master. The first tier is Express on a web server and exists primarily only as a forwarding mechanism.

View 1 Replies View Related

Finding SQL Server Performance Throughput Load

Aug 31, 2007

Hello!! guys..

I am using sql server 2005 enterprise edition in the clustered environment with netapp storage (one server) I monitor the server performance, basically using windows performance monitor counters such as avg.disk queue length,avg. disk reads/sec, avg disk writes/sec, processor time, available memory Mbytes, cache hit ratio etc. and using some sql server dmvs .

At this point all looks good.

My problem i dont know how much load sql server can handle more .How much it being utilized now? whehet it has reached its limits...how do i know it is just about to reach its linits??

how much throughput sql server is handling at present, how much more it can handle if incoming traffic increases.

Basically i want to find performance baselines , how much more it can handle so that i can plan for the future ..

How do i measure all this?
what are different methods available if i want to handle increased incoming traffic? (e.g. adding multiple servers etc.)
It will be really great if someone can share his experience on this..

Is there any article/white paper on this ..

Any suggestion/help appreciated

Thanks

View 1 Replies View Related

Error While Establishing A Connection To The SQL Server 2005 - Could Not Open A Connection To SQL Server

Apr 12, 2007

Hi, I had an old web application created during asp.net 1.1 and it have a connection problem with the sql server 2005 when it is mirgrated to a new webserver with dotnet framework 2.0 platform. I have enabled the remote access(TCP/IP and named pipes) in sql server 2005, did all the neccessary things, check whether the TCP/IP is enabled, named pipe is enabled...  I created another web application using VS 2005. The database connection works perfectly well.This are the connectionString from the old web application.<appSettings>    <add key="ConnectionString" value="Server=127.0.0.1;Database=somedb;User id=user; Password=somepassword; Trusted_Connection=False; POOLING=FALSE"/></appSettings>  Thankyou in advance! 

View 4 Replies View Related

Integration Services Extraction/loading Throughput/performance

Apr 28, 2006

I'm new to integration services.
I want to create a centralized reporting system for our customers. Some customers have up to 1,000 sites and some are expected to grow past 5,000 sites. The sites are running POS applications and I want to extract the POS sales data from these sites. Is it practical to expect that SSIS can handle the extraction of data from this many sites and load the data into a central
SQL database? The POS sales data at the sites is stored in SqlExpress databases but the data is also available in XML format.
If it's practical for Integration Services to do this, what frequency is it possible to pull this data?
I realize that the amout of data is relative but just wondering if anyone is attempting to do this with integration services.
If not with integration services, then what method(s) are available and used to extract data from this many remote sites?

View 3 Replies View Related

Open Connection

Nov 1, 2007

Hello everybody I would like to know more about the number of possible connection to a sql server is it by pool ? or there is max for all the database ? all the server ? how I can get the number of connection open ? Thx in advance 

View 2 Replies View Related

Could Not Open Sql Connection

Sep 22, 2007



Hi,
I hope this is right place to ask for help.If it is not, Please show me where and if it is please Help me
I using Window Vista bussiness, Microsoft visual 2005 professional edition, Microsoft SQL server express edtion
I have created table on Database.
My sql server name is KYAW-HQ
**but in the bar it shown like as KYAW-HQSQLEXPRESS
My data base name is kyaw
I have already Enabled Name Pipes and TCP/IP setting in sql studio management tool express
I using window authentication to log in to sql server management studio express.

My coding for c# is as follow:


private void button4_Click(object sender, EventArgs e)

{

//connect sql connection

SqlConnection con = new SqlConnection("Server=KYAW-HQ;Database=kyaw;UID=;PWD=;");

//open sql conection

con.Open();

SqlDataAdapter ad = new SqlDataAdapter("Select * From kyaw", con);

DataSet ds = new DataSet();

ad.Fill(ds, "kyaw");

dataGridView1.DataSource = ds.Tables[0].DefaultView;

con.Close();





}



After I click the button the error has shown like below

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).

Please tell me what i have to do.
If someone read me, please tell me and advice me how to fix above problem.
Thanks

View 9 Replies View Related

Cannot Open SQL Connection

Jan 22, 2008

Hello!

This code sample stops when I try to open a connection (see below). Ther error message reads "pipe provider , error 40". The help suggests that the credentials are wrong. I donīt think so, could there be another problem? Tough question but, I would appreciate any help.


System.Data.SqlClient.SqlConnection sqlConnection1 =

new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["SwimAdminConnectionString"].ConnectionString);



System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand();

cmd.CommandType = System.Data.CommandType.Text;

string sql1 = Session["txtFirstName"].ToString();

string sql2 = Session["txtLastName"].ToString();

cmd.CommandText = "INSERT dbo.Member (mbrFirstName, mbrLastName) VALUES (sql1, sql2)";

cmd.Connection = sqlConnection1;

sqlConnection1.Open(); //EXCEPTION HERE!!!

cmd.ExecuteNonQuery();

sqlConnection1.Close();

View 26 Replies View Related

How Leave Db With 1 Ldf While It Was Created With 2 Ldf ?

Jan 18, 2002

I want to remove 2 big ldf files (400 mgb and 300 mgb) and start db with only one ldf.
I tried sp_attach_db specifing only mdf file but geting errors
-------
microsoft help PRB: sp_attach_single_file_db Does Not Work for Databases with Multiple Log Files (Q271223)
..... You cannot attach a database that has been created with multiple log files without also attaching all the log files.
----

how can I remove those big ldf files and create new ldf (defult(1mgb)

View 1 Replies View Related

Auto Update Statistics Asynch And Sporadic Blocking Of Throughput

Oct 20, 2007

Over the past week and a half we started experiencing a sporadic slowdown in our production x64 SQL 2005 Ent. Edition server. Users started complaining of slowness then they started getting timeouts. In looking at sp_who2 and perfmon we saw the following during the slow/frozen periods:
* Dramatic increase in Perfmon Active Transactions
* CPU higher than norm, but not dramatically so
* sp_who2 shows a number of spids in SUSPENDED state (and not running waits)
* no blocking indicated from sp_who2
* active connections slowly increasing
* no disk queuing (or at most some spikes to 1)
After a couple of minutes of this we would then see the following:
* no more spids in SUSPENDED state
* Logins per second spikes dramatically
* Active transactions spikes down to "normal levels"
* CPU goes high then levels out at moderately higher than normal
* active connections slowly decreases back towards normal levels
* large spike in lock wait time

We turned on the Async Auto Update Statistics option (after testing in our staging environment) on the primary database about a week before we saw this problem. By turning it off we can visually see the problem go away by watching the above metrics. So my question is, What metrics can I use to see the "blocking" or resouce locking that is causing these problems?
Anyone?
Thx
Ron

View 3 Replies View Related

Could Not Open A Connection To SQL Server

Nov 25, 2007

Hi, Has somebody had a problem like this before? 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) That's part of the code:        SqlConnection con;        string sql;        SqlCommand cmd;               con=new SqlConnection("Data Source=elf/SQLEXPRESS;Initial Catalog=logos;Integrated Security=SSPI;");        sql="SELECT max(id_kandydat) from Kandydat";        con.Open();         cmd=new SqlCommand(sql,con);        int id = Convert.ToInt32(cmd.ExecuteScalar());        con.Close();         SqlDataSource7.InsertCommand="INSERT INTO Kandydat_na_Kierunek(id_kandydat, id_kierunku, id_stan) VALUES ("+"'"+id+"'"+","+"'"+DropDownList1.SelectedValue+"'"+","+'1'+");";  I don't really get it. I'm nearly 100% sure that before some changes in my project this had worked perfectly. Does anybody have any idea how to make it work again? I would be very grateful for any help. And, yesy, I know it is quite common error, but proposed solution found didn't help.Regards,N.  

View 5 Replies View Related

Could Not Open A Connection To SQL Server

Jun 3, 2008

i m getting this exception
"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)"
i want to know that this exception is from my end or on Server End. because 5 to 6 month my application works fine but in these days i m getting this exception 5 to 20 times a day
your help will really appricate...
 

View 5 Replies View Related

How Trace That Where The Connection Is Open

Jun 14, 2006

hi to all,
I create a web application in asp.net with sql server 2000, I use always close connection in .net code as my consern but when run my application then visit page to page give a error "General network error " message . then i check lots of connection is sleeping state in process info in sql manegment(current activity) Now i open the particular processId in Process info show open connection with any storeprocedure name and show .net sqlclient data provoider referance as open connection which is fetch the data from sql then i check in code find really the connection which is got data by that store procedure is not close properly and i close it. This is ok but one problem is that some procesId show  blank info with .net sql client data provoider. so how can i find where these conneciton is open in my applicaton because this processId doesn't give any clue for it , it show nothing only blank but status is sleeping. If any help have this context then quick feedback.
Thanks

View 2 Replies View Related

Could Not Open A Connection To SQL Server

Feb 20, 2006

Hi,

One issue has got me stuck while getting to build an application(ASP.NET/SQLSERVER). Whenever I try to connect to SQL Server 2005 (installed on local host) using Visual Web Developer 2005 Databse Explorer, I get the following error message:

"An error has occured while establishing a connection to the server.
when connection 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)"


NB:
- on SQL Servers' Surface Area Configuration, Remote connections are set to "Local and Remote connnections" and "Using both TCP/IP and named pipes".

ANyone with a solution? pse help

View 3 Replies View Related

Error: 40 - Could Not Open A Connection

May 8, 2007

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.



View 4 Replies View Related

Could Not Open A Connection To SQL Server

Jan 25, 2008

tried to install SQL Server 2005 in a fresh installed Windows 2003 SP2. And this server is a workgroup member, not a member of a domain.

The services (Database service, integration service, reporting services and so on) work fines, but I could not connect to server

I checked the log, I found the following error,error :40-Could not connect to SQL Server(Microsoft SQL Server,Error-1231).


I never had this problem and this time, I really got the trouble and do not have solution.

Who have ever encounter this problem? Or someone can help me?

Thanks.

View 1 Replies View Related

Open A DSN Connection In TSQL

Sep 21, 2006

I'm trying to update an SQL DB from data in Quickbooks. I am trying to find if I can open a dsn connection in a stored procedure, called from an ASP page, to the quickbooks db using odbc. The driver I have for odbc does not allow for linked servers. I'm very new to stored procedures and such so please bear with me. Thxs.

View 3 Replies View Related

Connection.Open(); Problem

Apr 17, 2008

hello ,i write this code
string sql="SELECT * FROM Customers";
SqlConnection connection = CollectionManager.getHotelConnection();
SqlCommand command = new SqlCommand(sql,connection);
command.CommandType = CommandType.Text;
command.ExecuteNonQuery();
result = command.ExecuteScalar();
connection.Open();
...
and when the debug goes to
connection.Open ()
it throws me this

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)

but i have all enabled ,browser running normally ,name pipes tcp ip enable all ,but it makes me this thsi all the time what mayb e huppens there?

View 4 Replies View Related

How To Open A Second Connection While In A Datareader

Dec 13, 2007



Hi,

I hope someone can help me with this.

I have created a data reader to loop thru a table and build an update statement.
Now I need to execute this statement in the datareader loop but the connection object is in use.

I tried creating another connection object but get an error:
"The context connection is already in use."

Is there a way to open another connection while the main context connection is open.
Just to make it clear, I do not want to read all the rows into memory first and then call update, it has to
happen for each iteration of the datareader.

Thanks.
--
With Regards
Shailen Sukul
Software Architect/Developer/Consultant
(BSc | Mcts (Biztalk (IP)) | Mcpd | Mcts (Web, Win, Dist Apps) | Mcsd.NET | Mcsd | Mcad)
Ashlen Consulting Services Pty Ltd
(http://www.ashlen.com.au)
MSN | Skype | GTalk Id: shailensukul
Ph: +61 0421 277 812
Fax: +61 3 9011 9732
Linked In: http://www.linkedin.com/in/shailensukul

View 7 Replies View Related

Open Connection In Sql Server

Feb 9, 2006

Try
Dim l_connString As String

l_connString = "Server=kangalert;database=Order;user id=sa;password=123;"
m_cn = New SqlConnection(l_connString)
m_cn.Open()

Catch ex As SqlException
Dim l_sqlerr As SqlError
For Each l_sqlerr In ex.Errors
MsgBox(l_sqlerr.Message)
Next
End Try



i got this in my mobile application, which try to open a connection directly to the sql server, but i got the following message

General Network error, check your network documentation.

View 7 Replies View Related

Server Error While Trying To Open Connection

Feb 12, 2007

Hi,
I've created an "ASP.NET Web Application" project in Visual Studio and I want to simply open a connection to a database in SQL Server. All I have done is adding these 3 lines below without modifying any other generated codes by Visual Studio.(I've done this within code behind in Page_Load() not by <script> tag within HTML code)
public class WebForm1 : System.Web.UI.Page {   private void Page_Load(object sender, System.EventArgs e)  {   // Put user code to initialize the page here   SqlConnection c = new SqlConnection();   c.ConnectionString = "workstation id=BABAK;integrated security=SSPI;initial catalog=db1;persist security info=False";   c.Open();  }  ...   }
But I get this error :
Server Error in '/projects/fortest/tDB2' Application.--------------------------------------------------------------------------------
Login failed for user 'BABAKASPNET'.
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 'BABAKASPNET'.
Source Error:
Line 24:    SqlConnection c = new SqlConnection();Line 25:    c.ConnectionString = "workstation id=BABAK;integrated security=SSPI;initial catalog=db1;persist security info=False";Line 26:    c.Open();Line 27:   }Line 28:  Source File: c:inetpubwwwrootprojectsfortest db2webform1.aspx.cs    Line: 26
What's wrong ?

View 2 Replies View Related

Error: 40 - Could Not Open A Connection To SQL Server

Jul 11, 2007

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

View 1 Replies View Related

Failed To Open A Connection To The Database

Nov 21, 2007

Hello,



          I receive
this error when choosing the data connection in TableAdapter Wizard for me to
reference the ASPNETDB.mdf database.



Failed to open a connection to the database









"The header for file
'C:InetpubwwwrootWebsites4App_DataASPNETDB.MDF is not valid databasefile header. The FILE SIZE property is incorrect.An attempt to attach an auto-named database exists, or
specified file cannotbe opened, or it is located on UNC share."

Check the connection and try again.







 I already have the connection at config but the error
persists. 













... 
<connectionStrings>    <add
name="ConnectionString1" connectionString="Data
Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|mydatabase.mdf;Integrated
Security=True"providerName="System.Data.SqlClient" />    <add
name="ASPNETDBConnectionString1" connectionString="DataSource=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated
Security=True" providerName="System.Data.SqlClient" /> 
</connectionStrings>  <system.web>...  cheers,imperialx 

View 2 Replies View Related

Error: 40 - Could Not Open A Connection To SQL Server

Feb 7, 2008

hI I have a website which is on a web server owned by another companyI have webpages which should connect from the web server to sql server 2000 which is based at my companyhowever I am getting the error messageAn 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) When the website was on citrix it connected fine, however once it has moved to a web server it does notI have checked and tcp/ip and named pipes are both enabled any1 any ideasthanks in advance!! :-)  

View 13 Replies View Related

Open A Second Connection When The Fist Fail

Mar 28, 2008

Hi, I have a web apllication using asp.net, I have two connectionstrings (cadenaCon and cadenaCon2) in web.config.
<connectionStrings>  <add connectionString="Server=SUNBOGW-MROMEROSQLEXPRESS;Database=ModulosWebkkk;UID=sa;PWD=martha;"  name="cadenaCon" providerName="System.Data.SqlClient" />  <add connectionString="Server=SUNBOGW-MROMEROSQLEXPRESS;Database=ModulosWeb;UID=sa;PWD=martha;" name="cadenaCon_bak" providerName="System.Data.SqlClient" /></connectionStrings>In the class file I have this sub and it works well
Public Sub New()         conexion = New SqlConnection(ConfigurationManager.ConnectionStrings("cadenaCon").ConnectionString.ToString)End Sub
My problem is I like to try to connect with cadenaCon and if this connection fails use the other. I used a try but it donÂīt work,
Public Sub New()   Try      conexion = New SqlConnection(ConfigurationManager.ConnectionStrings("cadenaCon").ConnectionString.ToString)   Catch ex As Exception       Throw New Exception(ex.Message)        conexion = New SqlConnection(ConfigurationManager.ConnectionStrings("cadenaCon_bak").ConnectionString.ToString)   Finally   End TryEnd Sub
Please I aprecitate a sugestion. Thanks 
Martha

View 1 Replies View Related

Error 40: - Could Not Open A Connection To Sql Server

Apr 19, 2008

HiI am connecting to an external web server running sql 2005 absolutly fine when testing a site using my localhost on my laptop.  How ever, when i deploy the site to my server i get the error 40 code - the external database its trying to connect to is on a different server to both my own localhost and my own server.here is my connection string from my web.config: <add name="plightConnectionString" connectionString="Data Source=111.222.333.444;Initial Catalog=plight;Persist Security Info=True;User ID=xxxxxxx;Password=xxxxxxxx;" providerName="System.Data.SqlClient" />  I've googled the error but all answers require alterations to the server where the sql database is installed, and it works from my localhost anyway - is there anything i need to do to my own server which is running the website?  Regards 

View 5 Replies View Related







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