database-connection

How does database connection works in php-mysql

Is it better to close the connection after each query is executed or put the connection as is it, then php will automatically close that connection. Which one is better and why? ...

How to detect Oracle broken/stalled connection?

In our server/client-setup we're experiencing some weird behaviour. The client is a C/C++-application which uses OCI to connect to an Oracle server (using the OTL library). Every now and then the DB server dies in a way (yes this is the core issue, but from application-side we're unable to solve it but have to deal with it anyway), that...

Multiple Connection Types for one Designer Generated TableAdapter

I have a Windows Forms application with a DataSet (.xsd) that is currently set to connect to a Sql Ce database. Compact Edition is being used so the users can use this application in the field without an internet connection, and then sync their data at day's end. I have been given a new project to create a supplemental web interface for...

what is collation_database, collation_connection, collation_server used for in mysql?

Illegal mix of collations (big5_chinese_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'like' sometimes this error will be throw, what's up ? what's the collation_* used for ? Can someone give me a example to show how the character is encoded and transited and selected relate to collation_*? ...

MySQLCommand BeginExecuteReader is missing an AsyncCallback parameter rendering it virtually useless

Hi, I'm hoping someone here might help me. The company I work for would prefer that I use MySQL instead of MSSQL. So I downloaded the latest driver (6.1) and am porting the DB layer. However I can not find the BeginExecuteReader function which takes a callback as parameter. Is this for a reason? Or does it work differently with MySQL...

Connection Pool Strategy: Good, Bad or Ugly?

I'm in charge of developing and maintaining a group of Web Applications that are centered around similar data. The architecture I decided on at the time was that each application would have their own database and web-root application. Each application maintains a connection pool to its own database and a central database for shared data ...

JDBC Connection pooling using C3P0

Following is my helper class to get DB connection: I've used the C3P0 connection pooling as described here. public class DBConnection { private static DataSource dataSource; private static final String DRIVER_NAME; private static final String URL; private static final String UNAME; private static final String PWD; ...

Will resetting an application pool automatically close all database connections?

I am running IIS6.0. I have the DefaultAppPool running one website. If I reset this application pool would that automatically close all database connections that are being used by the website? hope that makes sense, any help is appreciated. ...

OracleClient + TNSless connection with .NET

We are using System.Data.OracleClient and the abstract base classes DbConnection, DbCommand (etc) to connect to Oracle. The connection works fine in our development stages. During staging we encounter the error ORA-12514: TNS:listener does not currently know of service requested in connect descriptor. Our goal was to connect without...

Configuring james to connect to Microsoft sql server 2005

I'm getting database connection error whenever I try to connect james to sql server 2005, I already loaded driver sqljdbc in the lib directory in james, then why I'm getting an error? Here's the config.xml file of james which is trying to connect to sql server: <data-source name="maildb" class="org.apache.james.util.dbcp.JdbcDataSourc...

PHP OOP extending class can't access database connection

Perhaps you can help. I have a main class that creates a MySql connection. Then I extend this class. I wasn't able to access the connection unless I did a parent::__construct(); and recently while doing this I got an error message that I was out of connections. So how do program this so it doesn't run out of connections and can access ...

Rails RSpec with Multiple Databases

I run a Rails app, and we're in the process of splitting out our signup process to a separate app. The signup app has its own separate database (for CMS and collecting prospects), but it also needs to have access to the main database. This works really well using ActiveRecord::Base.establish_connection. However, I'd like to be able to ...

Cannot connect to DB after I uploaded website to a host

I have upload my website to a shared hosting, set-up everything and my asp.net 3.5 app won't connect to SQL Server database on the shared hosting provider. This is the error I get: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify...

ORM Technologies vs JDBC ?

Hi, My question is regarding ORM and JDBC technologies, on what criteria would you decide to go for an ORM technology as compared to JDBC and other way round ? Thanks. ...

How do you manage database connections in php?

So recently I've really started to use php actively, and I need some insights on different ways to use database connections. At first I just used the simple mysql_connect(): <?php $connection = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die(mysql_error()); mysql_select_db(DB_DB, $connection); ?> After a while I created a da...

Mysql db class - trouble connecting

So I'm trying to make a mysql database class, and I want to keep my db selection in a seperate method from the constructor. For some reason it the setDb() function doesn't want to work. class mysql { public function __construct($server,$user,$pass) { if(!$this->mysql_connection = mysql_connect($server,$user,$pass)) print 'Could n...

Do I have to explicitly disconnect from a database when using Java?

It is necessary to disconnect from the database after the job is done in Java? If it is not disconnected, will it lead to memory leaks? ...

How do I have multiple schemas per database connection in Eclipse DTP?

I'm using the Eclipse DTP to do my SQL development. When I create a database connection I'm promoted to enter the name of the database (schema), and I cannot continue until I enter it. However, I have several databases on each server, and I want to see them all under the database connection (like most the database tools let you). Can I ...

What happens when NOT closing recordsets in classic asp?

In legacy applications at work, i see not closed recordsets scattered on lots of pages. What consequences does this have? Does the connection close automatically? Are resources released at the end of every request? Update: Another question related to this problem i think txn! ...

Hibernate: Connect to MySQL without Username or Password

I am developing a hibernate application that connects to a MySQL database. The customers would like to only specify a connection string, ie: jdbc:mysql://username:passwd@server:port/db_name However, Hibernate will not connect using just this string. It also wants the username and password connection properties set. Is there any way ...