connection

Common WCF Exception : Connection Unexpectedly Closed

I have three projects. One is a WCF Services Project, one is a WPF Project, and one is a Microsoft Unit Testing Project. I setup the WCF Services project with a data object that looks like this: [DataContract] public enum Priority { Low, Medium, High } [DataContract] public struct TimeInfo { [DataMember] public In...

VistaDB Connection Issue Programmatically using SQLConnection and ConnectionString

I'm getting an error connecting to a VistaDB using a connection string in the web.config file. It works fine using a SQLDataSource AFTER I specified the ProviderName. On another page I'm only connecting in code and Here is the code for the connection string: Public Function CreateConnection() As SqlConnection _connectionString = ...

PHP's sleep function and client connections

How does PHP handle client connection while doing sleeps? Or put another way ... what happens if the client closes the connection to the server while a page is being processed? Does it just kill the process, or does it continue to process the page until the end? Since I'm not sure of the answers to the above how would I implement the ...

C# Web Server Connection Problem

I'm trying to make a simple C# web server that, at this stage, you can access via your browser and will just do a "Hello World". The problem I'm having is that the server can receive data fine - I get the browser's header information - but the browser doesn't receive anything I send. Furthermore, I can only connect to the server by goi...

Best way to manage database connection for a Java servlet

What is the best way to manage a database connection in a Java servlet? Currently, I simply open a connection in the init() function, and then close it in destroy(). However, I am concerned that "permanently" holding onto a database connection could be a bad thing. Is this the correct way to handle this? If not, what are some bette...

Are Open and Closed only relevant values of ConnectionState enumeration?

The MSDN page on ConnectionState enumeration says "This value is reserved for future versions of the product", for all values except Open and Closed. What does that mean? Are other values even used? However from this StackOverflow answer appears that ConnectionState.Broken is also used. ...

java.sql.Connection extension for SSH

I have a MySQL database behind a firewall which can only be accessed via an SSH connection. Does anyone know of an implementation of java.sql.Connection which would allow me to make an SSH connection to this database? ...

What is the connection string for odbc connections?

I've always done web apps and now I need to do a console app. I need to use both an odbc connection and a regular connection. In the past I would have used: <add name="LinkConnectionString" connectionString="Data Source=SERENITY\SQLEXPRESS;Initial Catalog=Link;Integrated Security=True" providerName="System.Data.SqlClient"/> In the w...

In Java when does a URL connection close?

When does java let go of a connections to a URL? I don't see a close() method on either URL or URLConnection so does it free up the connection as soon as the request finishes? I'm mainly asking to see if I need to do any clean up in an exception handler. try { URL url = new URL("http://foo.bar"); URLConnection conn = url.openConnect...

Long lived JMS sessions. Is Keeping JMS connections / JMS sessions allways open a bad pratice?

Is keeping JMS connections / sessions / consumer always open a bad practice? Code draft example: // app startup code ConnectionFactory cf = (ConnectionFactory)jndiContext.lookup(CF_JNDI_NAME); Connection connection = cf.createConnection(user,pass); Session session = connection.createSession(true,Session.TRANSACTIONAL); MessageConsumer...

Simulating connection problems for .NET HttpWebRequest

Are there ways to programmatically simulate connection problems (slow connection, response does not complete, connection gets dropped, etc.) when using the HttpWebRequest class? Thanks EDIT: To elaborate more, I need this for debugging but would want to turn it into a test eventually. I'm using the async methods BeginGetRequestStream, ...

Oracle: TNS-12532: TNS:invalid argument

Trying to establish a connection between my windows box (2003 server) and the oracle (11g) database. I'm able to successfully ping the oracle host from the windows box. However tnsping command fails with the error tns-12532 error. Any ideas to solve this issue? ...

Connect to Exchange mailbox with Python

I need to connect to an Exchange mailbox in a Python script, without using any profile setup on the local machine (including using Outlook). If I use win32com to create a MAPI.Session I could logon (with the Logon() method) with an existing profile, but I want to just provide a username & password. Is this possible? If so, could someo...

How can I set the program name for sybase connections in jdbc?

I can do it in C, and I can do it in perl, but I don't see how to set the program name on sybase connections using jdbc? ...

Why does global.asax change sql connection?

In asp.net 3.5, I have a problem that if I upload my global.asax to the remote web server, the app starts looking for my local sql server and eventually times out. I use a different config file for the local and remote because of the sql server login. Local is windows auth and remote is sql server auth. However, none of that info is ...

Is maintenance on long lived JMS connections necessary?

I keep a JMS connection always open, because I have a MessageListener on it. Is it a common need to worry about minimizing maintenance of applications with long lived JMS connections? I was thinking something along the lines of try to recover from some possible common well known kinds of failure, like temporary connectivity failure. ...

Go Daddy SQL Server 2005 Remote Connection

Hi Guys, Is it possible to connect to my remote database hosted at godaddy from locally from my PC? And if yes how? I tried the connection string provided to me but it didn't work. Thanks ...

Grails Database Connection Problem When Deployed

I can successfully run my Grails application in Jetty. It succeeds in connecting to my MsSql database and everything is fine. When I deploy that same application in Tomcat 6 on the same machine, I receive the following error on startup in the Tomcat log: Caused by: java.net.ConnectException: Connection refused: connect I don't belie...

How do I retrieve a URL from a web site using Java?

I want to use HTTP GET and POST commands to retrieve URLs from a website and parse the HTML. How do I do this? ...

Connect to Oracle DB from VB 2008 application without installing Oracle software?

Imports System.Data.OleDb Public Class Log Private mConnectionString As String = "Provider=OraOLEDB.Oracle;Data Source=(DESCRIPTION=(CID=GTU_APP)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521)))(CONNECT_DATA=(SID=xxx)(SERVER=DEDICATED)));User Id=xxx;Password=xxx;" Dim ds As New DataSet Dim da As New OleDbDataAdap...