database-connection

Opening one MySQL connection vs opening and closing a lot of connections?

I have a > x20000 loop in php that checks if an entry exists in a MySQL database, I open & close the connection for every entry in the loop, but a friend told me that's crazy and I should open one connection, run the loop and then close it, but he didn't tell me why. Could someone explain me the benefits of reusing the same connection? i...

WebSphere to Oracle - doesn't accept correct password.

In WebSphere 6.1 I have created a datasource to an Oracle 11g instance using the thin JDBC client. In Oracle I have two users, one existing and another newly created. My websphere datasource is OK if I use the component-managed authentication alias of the existing user, but fails with "invalid user/password" message if I use the alias ...

How to deploy a SQLite database table in Windows Mobile device ?

I am developing windows mobile application. I have added the SQLite database file in my project by using the Add Existing Item in visual studio. It gets deployed in the windows mobile emulator. I am also able to connect to the SQLite database through C#. When I perform the operations select, insert etc on the table of the SQLite database...

WCF hosted in IIS, Problem connecting to database with integrated security

I have a WCF service hosted in IIS 5.1 on my development XP machine. The service cannot connect to sql server DB with integrated security=true. The same service works fine when hosted in a console app. I have unchecked Anonymous access and checked the Integrated Windows Authentication in IIS These are my setting in Web.Config <connect...

Oracle connection not closing in Java Application

I have a connection leak in some older Java web applications which do not utilize connection pooling. Trying to find the leak is hard because IT will not grant me access to v$session SELECT Count(*) FROM v$session; So instead I am trying to debug with System.out statements. Even after closing the connection conn.close(); when I print c...

Python Database connection Close

Using the code below leaves me with an open connection, how do I close? import pyodbc conn = pyodbc.connect('DRIVER=MySQL ODBC 5.1 driver;SERVER=localhost;DATABASE=spt;UID=who;PWD=testest') csr = conn.cursor() csr.close() del csr ...

How to Handle Database Connections in Qt?

Here my problem; in such a case it complains about duplicate connections with same connection name: Test::Test(QString connectionName) { db=QSqlDatabase::addDatabase("QMYSQL",connectionName); } int main(int argc, char *argv[]) { QString connectionName=QString("test"); QCoreApplication a(argc, argv); Test myDb(connecti...

How can I connect to a database manually in CodeIgniter?

Is it possible to connect to a database manually, using any set of drivers for php, in CodeIgniter? Would I just open a connection in the model? I have a need that CodeIgniter won't cover but I'd like to use it for it's MVC architecture. I just can't use it's ActiveRecord like in the demos with MySQL, etc. If I can just do a "regular...

Flex with Oracle 10g

Hi, I am new to Flex 3/4 and was after some help with what is involved (examples pls) in creating an application in flex that runs off an Oracle 10g database to both retrieve/modify data from, with flex. Basically would like to know how to connect flex to an oracle database to perform database transactions like updates/deletes/inserts....

Connection with a remote database using java swing application

Hello, I am working with a swing application and the initial part of the application is "user authentication" ..for that module i want to authenticate(verify) the user but the problem is that my database is remotly located with different port(not 1521). everytime i try to connect through some easy and simple jdbc,a well designed exceptio...

How to use Dataset desgner and Data Sources windows with WPF and XAML in vb.net 2008?

More moans about WPF: As it seems generally likely that MS are going to get rid of Windows Forms (sooner or later), and I am informed by the same organisation that WPF is 'cool', just exactly how can I use the wonderful graphical data toolset in vb.net 2008? I understand the basic concepts of creating table adapters and multiple queries...

How to populate combox using databse

i want to put items in GWT combobox using database. please provide me any suggestion to get the item of GWT-combobox using database. ...

Possible to connect hosted web application to local database?

Is there any tech out there that allows for a hosted web application to connect to a local database? For example, say I would like to write some web-based software for a popular point-of-sale solution. The ideal would be to have the customer input their database connection credentials and have the application connect to their locally hos...

problem in connecting to oracle 10g express edition through java

Hi, I'm unable to connect Oracle 10g database.I am getting exception java.lang.ClassNotFoundException:oracle.jdbc.driver.OracleDriver The code is: try { Class.forName("oracle.jdbc.driver.OracleDriver"); } catch(ClassNotFoundException e) { e.printStackTrace(); } try { con=DriverManager.getConnection("jdbc:oracle:thin:@local...

Quick ways to test OLE DB Connection String

Hi all: For debugging purpose I'd like to know ways to test OLE DB connection string quickly. I've found this free software, it works on my machine, tested successfully. Is there a even quicker way to do so, maybe from command line on Windows? Because most of the time, it is the client rather than me that would do this task, so I pref...

Make connection to database only once on page load

When I load my page I populate my repeater with the following code. Dim conn As Data.SqlClient.SqlConnection Dim Comm As Data.SqlClient.SqlCommand Dim reader As Data.SqlClient.SqlDataReader 'conn = New Data.SqlClient.SqlConnection("Server=localhost\sqlexpress; " & _ '"Database=MyDB; Integrated Se...

IIS to access SQL server on different machine

I have a Gui running on a server with the IIS and the SQL database both on the same machine. I have this connectionstring in the webconfig. Data Source=localhost\SQLEXPRESS;Initial Catalog=XYZDB;Integrated Security=True Now i want to access another database on a different server, i thought it would just take me to change "localhost" ...

BIRT: How can I access the current DB connections/session from JavaScript?

I need to run a piece of Java code which builds a complex SQL query. I know how to call the Java methods from JavaScript in BIRT but how can I get a pointer to the current DB session/connection? ...

BIRT: Join too slow

I have a large table in my DB from which I need a couple of rows for a report. The JOIN turned out to be too slow. So my solution was to read the values into a HashMap and simply join them manually in each row of the report. How can I fill the map in the open script of a scripted data source? My current solution was to pass the URL/use...

How to Notice Close of MySql Server in Qt

When I closed MySql server, how can I understand that mysql server is gone away from my Qt program? Edit: Here my trial: When I close MySql, I get these results, and I can't catch that MySql is closed. My Code Snippet is QSqlQuery query(db); query.exec("SELECT * From RequestIds"); qDebug()<<query.lastError(); qDebug()<<db.lastError(...