database-connection

Oracle query fired off, then never returns

I have this problem in my ASP.NET application where I'm seeing some of my Oracle queries fired off to the server then not returning. Ever. It happens in several places in my app and I can't explain it. Here's one specific scenario where I'm seeing this behavior: During application start-up I am pre-fetching data asynchronously into the ...

DBCP connection validation problem

I decided to use DBCP mainly because I was getting timeouts on my database connections. In theory, once you define a "validation query", DBCP will by default run that query on the connection before using it, so you always know the connection is OK. I set it up two weeks ago and it seemed to work. However, last night I got a timeout exce...

JDBC Connection closed by peer (weird)

Hi all, I'm facing sort of a strange issue with two applications of mine. Here's the setting: Two tomcat / java apps, running in the same network, connecting to the same MS-SQL-Server. The one app, which happens to be in an DMZ in order to be accessible from the internet uses to produce "jdbc Connection closed by peer" exceptions in un...

SQL Express connection string hell ASP.Net

SQL Express 2005 is running locally. I have a project written by another person running on the same machine. All I want to do is connect to it, can't be that hard right? This is the one I use in my old classic ASP code to hit another database running on the same instance: Provider=SQLOLEDB;Data Source=MYLAPTOP\MSSMLBIZ;Persist Security...

Connect multiple tables in different databases? MySql.

Hey, I am looking for a good way to connect to at least 2 databases in mysql using php and gathering information within each of those databases from tables. The tables will have related information. eg. I have site names in one database('siteinfo') in a table called 'sites'. I also have the site descriptions in another database('sitede...

NHibernate connection string: how to specify port number and server\instance?

I am replacing my old DAL with NHibernate 2.1. My NHibernate config works on my local dev machine but not on UAT. The UAT database is a cluster setup on a none default port. I am using a standard NHibernate confie file similar to below: <?xml version="1.0" ?> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > <sessi...

How are OLE DB connection strings mapped to DLLs?

How does the OleDbConnection constructor know what provider DLL (I assume it's a DLL) to call for a given provider name in the connection string? For example, in the following code... string cnStr = "Provider=Sybase.ASEOLEDBProvider.2;Server Name=etc..."; OleDbConnection cn = new OleDbConnection(cnStr); How does OleDbConnection know w...

Detect OS Sleep and Wake Up events in Java

Is there a way for a Java program to detect when the operating system is about to go to sleep, or failing that, at least detecting a wake up? The actual problem is that in a particular application a number of MySQL database operations are run in the background. In testing on a Windows machine these database transactions are interrupted ...

How to bind the Command Timeout to an dbml (Linq-To-Sql data class)?

I know that we cannot set the Command Timeout in the Connection String. So I put it in the MyDataContext constructor. But there are many constructors, this file is usually overwritten by the visual designer and it doesn't seems the right way to do that. How would you do that? ...

Storing db connection strings

Whats the preferred file (and why do you prefer it) to store database connection strings in an ASP.Net application, where security is the primary issue? Thanks ...

asp.net SQL Database File Error

Hi, We're getting the following error when trying to establish a connection to a database file in the project: Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed. Any ideas on how we can fix it? Thanks in advance! ...

.NET DBF Database connectivity issue

Hey all, really bashing my head against a keyboard here, any information or pointing in the right direction would be fantastic. I have a set of .DBF files with .MDX indexes. They're supposed to be dBASE version 7, but the Borland BDE only connects to 5.0 reliably from what I've found. I can get connected using the IV and 5.0 connection...

How do I connect to Interbase 6 on a remote location from .NET?

What drivers should I use? Are they free? How should the connectionstring look like? Thanks ...

How to verify an application is the application it says it is?

Here's the situation: we have a common library which can retrieve database connection details from a central configuration store that we have setup. Each application uses this library when working with a database. Basically, it will call a stored procedure and say "I am {xyz} application, I need to connect o " and it will return the co...

handling two mysql connection in PHP

Hi, for a project I need to open a Mysql connection, close it and let old legacy code run after that. The legacy code have it's own connection, and just call mysql_query($sql) without the resource parameter. How can I handle this? Can I set a Mysql connexion as the global one? Must I re-execute the mysql_connect() statement? The legac...

Get current connection protocol in SQL 2000

I'm currently using SQL 2000 (it's a vendor server - don't ask...), and I'm wondering if there's a way to detect the connection protocol of connected clients. For SQL 2005+, I use: select net_transport from sys.dm_exec_connections where session_id = @@spid But SQL2000 lacks this dynamic view. Anybody know the equivalent function on S...

Hibernate session and garbage collector

An object with hibernate session data member when garbage collected, is session's jdbc connection closed? In other words is leaving closing session to garbage collector bad idea? ...

VBScript how to set the connection string

I am not sure whether it has been disscussed before or not but I have the following code (I changed from example for an Access database.) I don't know what to put inside the 'Provider' and the 'Data Source'. I'm using MS SQL Server 2005 and how to find this information in my machine? Please, even I try to follow from here http://www.c...

How do I specify SSIS Package Database Connection Through Package Configurations?

I have an SQL 2005 SSIS package that takes data from an Oracle DB Table, and transfers it to a SQL Server Table. I have set up an "Oracle Provider for OLE DB" for the Oracle connection and a "SQL Native Client" for SQL Server Connection. The Oracle and SQL connections will depend on the development and shipping stage, which are: Loca...

Hibernate c3p0 connection pool not timing out idle connections

We have a java server connecting to a MySQL 5 database usingHibernate as our persistence layer which is using c3p0 for DB connection pooling. I've tried following the c3p0 and hibernate documentation: Hibernate - HowTo Configure c3p0 connection pool C3P0 Hibernate properties C3P0.properties configuration We're getting an error on ...