Menu
  • HOME
  • TAGS

Why my mysql transaction is not working properly?

php,mysql,mysqli,transactions,database-connection

You can only do one query at a time with mysqli_query Look at mysqli_multi_query() http://www.w3schools.com/php/func_mysqli_multi_query.asp $query= "START TRANSACTION; INSERT INTO `123`.`table1` (`name1`,`name2`) VALUES ('". $name . "','". $email ."'); INSERT INTO `123`.`table2` (`table1_id`,`name3`,`name4`) VALUES (LAST_INSERT_ID(),'". $story . "','". $img ."'); COMMIT;"; var_dump(mysqli_multi_query($con,$query)); ...

Testing multiple connections to SQL Server

sql-server,testing,load,database-connection,connection-pooling

You can do it via Apache JMeter and next few steps: Download jTDS JDBC Driver and drop it to /lib folder of your JMeter installation Restart JMeter Add Thread Group to Test Plan and configure virtual users and iterations count Add JDBC Connection Configuration and provide JDBC url, driver class...

Powershell Error - Null/Empty Argument

sql,sql-server,powershell,database-connection

You changed my ForEach-Object loop to a foreach loop. If you want to use the latter you need to change the current object variable $_ to your loop variable $Server: foreach ($Server in $ServerArray) { $os = Get-WmiObject -Class Win32_OperatingSystem -Computer $Server $disks = Get-WmiObject -Class Win32_LogicalDisk -Computer $Server |...

Connection String of MS Access database

c#,ms-access,database-connection

If you know the path exactly you can use con = new OleDbConnection (@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source =\dtinaurdsna02\LE-IN\Admin\Quality Rating\Quality_Rating_Tool\Quality_Rating_Tool.accdb; Jet OLEDB:Database Password=xxxxxxx; Persist Security Info=True;"); If database is within the app folder and you can use below string path = Environment.CurrentDirectory; path = path + "\\Quality_Rating_Tool.accdb;"; con = new OleDbConnection (@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source"...

Node-Postgres Connect Error: EADDRNOTAVAIL

node.js,postgresql,database-connection,port

The problem was that no db objects were granted to the username above. Once I did this, all went well. Hope this helps someone else.

Persist Security Info Property=true and Persist Security Info Property=false

c#,database,ms-access,database-connection,connection-string

Even if you set Persist Security Info= true OR Persist Security Info=false it won't show a difference in front..The difference is happening at background When Persist Security Info set to false security-sensitive information, such as the password, is not returned as part of the connection if the connection is open...

Java “Connection” Class does not connect to the DB

java,mysql,netbeans,connection,database-connection

the error log is clear java.sql.Connection cannot be converted to kiltenros.Connection it seems that you imported the wrong class in the beginning of your class DriverManager.getConnection(url, uName, uPass) return you instance of java.sql.Connection. btw, change your local variable DBConnect to dbConnect so it won't has the same name as your...

There is already an open DataReader associated with this Command, without nested datareaders

c#,asp.net,ado.net,database-connection

The problem was that, when a query fails, the transaction can't be rolled back because the data reader is already open to process the query. A second exception is thrown and the first one is lost. I just placed the rollback inside a try catch block and used the AggregateException...

c# mysqlreader multithread fail

c#,multithreading,database-connection,mysqldatareader

Note that MySqlConnection instance is not guaranteed to be thread safe. You should avoid using the same MySqlConnection in several threads at the same time. It is recommended to open a new connection per thread and to close it when the work is done. Actually, connections will not be created/disposed...

I cannot get my logon to execute

php,mysql,apache,database-connection,server

// Connect to server and select database. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $username = mysql_real_escape_string($username); $pass = mysql_real_escape_string($pass); //EDIT $sql = SELECT * FROM $tbl WHERE username='$username' and pass= SHA1('$pass'); //$result=mysql_query($sql); $result=mysql_query($sql, $connect); if(!$result) { die('ERROR: ' . mysql_error()); } // Mysql_num_row is counting table row...

How can my C# application use a portable database with no installation or configuration

c#,database,database-connection

IF you want to use a database take a look at SqlCompact or SqLite Both of these allow you to store relational data and embed the database engine into your application. Shameless plus: SauceDB also supports both of these....

Database Design Advice for a Social Network App Needed

database,database-design,database-connection,relational-database,database-schema

You will need to have one more table in order to create what is known as a many to many relationship between the users and the groups. Since you didn't specify the rdbms you are working with, I'll use SQL Server for my code: CREATE TABLE TblUserToGroup ( UserToGroup_UserId int...

SQL Connection string Provider name

c#,sql-server,database-connection

You don't need to specify the provider name in the connection string if you are using the .NET Provider for SQL Server (System.Data.SqlClient). Provider names for .NET providers are implicit based on the implementing class and do not need to be specified in the connection string. Don't use a COM-based...

How connect database class with an array connect

php,database,database-connection

You've defined constants, so there is no need to wrap it in quotes, or concatenation. Using quotes would be treated as a string literals. $config = array(); $config['database']['host'] = DB_HOST; $config['database']['user'] = DB_USER; $config['database']['password'] = DB_PASS; $config['database']['database'] = DB_NAME; References: http://php.net/manual/en/language.constants.php https://php.net/language.types.string ...

java with ms access not showing database result

java,database,ms-access,database-connection

You are not getting error during execution of program because you are eating exception here: catch(Exception ex){ } You should try to print the exception trace to know what is going wrong. catch(Exception ex){ ex.printStackTrace(); } ...

Is it possible to know how many Oracle connections are opened in Excel VBA?

excel,vba,excel-vba,database-connection,adodb

The answer is no... and yes. There is nothing built in to keep track of how many ADODB connections you have open to a particular database. You would have to keep track of this yourself if it is a requirement. You could do this by adding each of your connections...

Connection parameters in SQL Developer

oracle,connection,database-connection,oracle-sqldeveloper,sqlplus

First of all you can check tnsnames in %ORACLE_HOME%\Network\Admin\tnsnames.ora If there is nothing helpful there - then connect in SQLPlus and do select host_name from v$instance. Port is almost always is 1521, but I don't know where to get it in the open session. If you can't connect on port...

Database Editing in Session OnEnd Classic ASP

asp-classic,database-connection

I can't see an SQL query anywhere in your code. If you're intent on using a recordset for your update then in place of studrec.Open "login", studcon, 1, 3 you should have something like studrec.Open "select * from login", studcon, 1, 3 This assumes that your database table is called...

Play - Execute an sql statement without writing the database configuration in application.conf

mysql,scala,playframework,database-connection,config

// **** create the connection **** here we can write val driver = Play.current.configuration.getString("rds.driver").getOrElse("") val host = Play.current.configuration.getString("rds.host").getOrElse("") val port = Play.current.configuration.getString("rds.port").getOrElse("") val user = Play.current.configuration.getString("rds.user").getOrElse("") val password = Play.current.configuration.getString("rds.password").getOrElse("") val url = "mysql://" + user + ":" + password + "@" + host + ":" + port + "/"...

Cannot connect to mysql server from java

java,mysql,database-connection

I changed the binding address in my.cnf file in /etc/mysql to the ip address of the server, and it solved the problem.

kdb+ 32-bit, what are the consequences of the 4GB restriction?

database-connection,port,32bit-64bit,kdb

Correct, a kdb+ instance is a whole process in its own right, with a port number set at command line by yourself. You can't do peach over a number of handles: handles:hopen each someList; {x"do some work"} peach handles You'll get noupdate, so would seem you can't do this manually....

Connecting to connectionString in app.config

c#,sql,wpf,ms-access,database-connection

The connection string is just a string, its meant to be used in your connection, so you should do: public void DoSomeDatabaseOp() { string cisconn = ConfigurationManager.ConnectionStrings["CTaC_Information_System.Properties.Settings.CIS_beConn"].ConnectionString; using (OleDbConnection conn = new OleDbConnection(cisconn)) { conn.Open(); //Create your commands or do your SQL here. } } You should create/destroy the connection...

How to get multiple database connections dynamically?

php,codeigniter,database-connection

Look at your get_person method, it takes 4 arguments: public function get_person(**$member, $host, $user, $pw**) but inside of that You call the method define_database passing 5 arguments: $this->define_database($member, $host, $user, $pw, **$database**) CI gives error because fifth argument is not defined in this scope....

MySQL I/O Performance in XAMPP

mysql,database,xampp,database-connection

XAMPP does not have a performance monitoring tool built in for Mysql, since it is a web server and just comes packaged with Mysql when installed. There are a number of free and paid ways to monitor I/O performance for Mysql. If you are on a linux server you can...

Is it secure to use include() to connect to server and database?

php,mysql,mysqli,database-connection,php-include

Yes, because the include is happening server-side. You should look up some information about server-side programming and client-side programming! Also MySQL functions are officially deprecated and MySQLi or PDO should be used instead!!!...

Can't connect to MySQL server at 127.0.0.1 using c3p0

java,mysql,database-connection,c3p0

I have fixed it. It turned out that I didn't have a jdbc server installed.

Mysql Host information not showing using PHP

php,mysql,database-connection

You need to specify your mysqli object in mysqli_get_host_info() function - http://php.net/manual/en/mysqli.get-host-info.php. Try this code: <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } /* print host information */ printf("Host info: %s\n", $mysqli->host_info); /* close connection */ $mysqli->close();...

Does DBCP connection pool connection.close() return connection to pool

java,database-connection,connection-pooling,apache-commons-dbcp

You'll end up calling PoolableConnection.close(), which returns it to the pool.

Laravel 5 passing database query from controller to view

php,laravel,model-view-controller,database-connection,views

controller public function show(Project $project) { $technologies = DB::table('technologies') ->select('*') ->where('id', $project->technology_id) ->get(); // you were missing the get method return view('projects.show', compact('project', 'technologies')); } View This will not work in your view: @if ( !technologies() ) @section('content') <h2>{{ $project->name }}</h2> @if($technologies) <ul> @foreach($technologies as $technology) <li><a href="#">{{ $technology->slug }}</a></li>...

AngularJS without framework

php,ruby-on-rails,angularjs,frameworks,database-connection

You can use AngularJS to do as little or as much as you would like on your web application. However AngularJS is a client side scripting language, if you need to communicate with a database you will need a server side language in order to do this. You ask if...

upgrading SQLite-net to SQLite.net - create SQLiteConnection

xamarin,database-connection,sqlite-net

Quite easy once you found it. The namespace SQLite.Net.Platform containt the implementation for the ISQLitePlatforminterface. I had to implement this in de platform specific libraries instead of the shared one. new SQLiteConnection(new SQLite.Net.Platform.XamarinAndroid.SQLitePlatformAndroid(), Path.Combine(path, db)); ...

Zend Framework- SQLSTATE[28000] [1045] Access denied for user 'webadmin'@'localhost' (using password: YES)

php,zend-framework,database-connection,putty

try to turn resources.db.params.hostname in resources.db.params.host locally works because the default is localhost Zend Framework application.ini config...

Connect AngularJS with database

mysql,angularjs,node.js,database-connection

Angular is a client-side (browser-side) technology. As such it passes application data to and from the server using HTTP calls (AJAX / JSON). So you'll need to create web services using node.js or some other server-side tech to access your MySQL data base.

Syntax error in from clause - no reserved words DA.fill

vb.net,database-connection,ms-access-2010

Use the query Dim myDataAdapter As New System.Data.OleDb.OleDbDataAdapter("SELECT Email FROM [Email-list]", conn) ...

Handling database environment configuration in Sails.js

javascript,node.js,database-connection,sails.js,sails-mongo

You want to save the actual connection definition in the either development.js or production.js and remove them from connections.js. It's a little non-intuitive. development.js module.exports = { connections : { mongoDev: { adapter: 'sails-mongo', host: 'localhost', port: 27017, user: 'username', password: 'password', database: 'database' } }, models: { connection: 'mongoDev'...

What happens if you close a closed connection?

java,jdbc,database-connection

If you are using the java.sql.Connection you should have no issue. From the Connection documentation: Calling the method close on a Connection object that is already closed is a no-op. i.e. it does nothing. This should stand for any proper implementation. Although it is conceivable for some implementation to have...

Connecting Android application to BlueMix stored DB2 Database

android,database,db2,database-connection,bluemix

You can not talk directly to the SQL DB on Bluemix from your android app. You will need to create an intermediary application on bluemix that talks to the db and your android app can talk to that application. You can implement this backend as a RESTful API (Java JAX-RS,...

connecting to a database through JDBC [duplicate]

java,mysql,jdbc,database-connection

In essence this is a ClassNotFoundException. Your first catch clause is empty and thus, although the exception is being caught, you are not acting upon it. In the least, I would do something like this: static { try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException ex) { throw ex; } } This...

Java, passing database connection into different classes.

java,database,db2,database-connection

how is that "conDA" object name can be understood as a connection of database? because the class ConnectionDA have the method getConnection implement that returns an object of the type connection. public Connection3(ConnectionDA conDA) throws ClassNotFoundException { this.conDA = new ConnectionDA(conDA.getConnection()); } And here the implementation of the getConnection()...

Database connectionstring windows authentication but passing user and password

authentication,sql-server-2012,database-connection

You are trying to use a Windows account when the connection string is expecting a SQL Server user account.

Logging into a PuppetDB instance like a typical SQL instance?

database-connection,puppet-enterprise

Depending on how PuppetDB is setup, it either using a built-in HSQLDB or Postgres to store its data. If you're using Puppet Enterprise, then it's probably going to be the Postgres backend. If that's the case, you can access it just using the psqsl command eg: [[email protected]]# psql psql (9.3.4)...

The configuration section 'connectionStrings' cannot be read because it is missing a section declaration

c#,c#-4.0,database-connection,connection-string

<configuration> <system.web> <compilation debug="true" targetFramework="4.0"/> </system.web> <connectionStrings> <add name="#" connectionString="#" providerName="System.Data.SqlClient"/> </connectionStrings> </configuration> replace your code with above configuration as well the tag should be in proper case exact as given let me know if you still stuck its might be some other issue....

Firebird 2.5 C++ client: error with DATE data type

database-connection,firebird

As previously commented, some methods in the API take the SQL dialect version as the parameter (isc_dsql_prepare, isc_dsql_execute_immediate and isc_dsql_exec_immed2). If you call these with the parameter 1 instead of 3 your statement will be parsed as a dialect 1 statement. As you note an example in the Interbase 6...

SSIS connection to Oracle

oracle,ssis,database-connection,tnsnames

There is a ton of information on the web about connecting to Oracle with SSIS. That is because it is total voodoo. I suggest using the attunity adapter: This is the 2008 version: http://www.microsoft.com/en-us/download/details.aspx?id=29284 This is the 2012 version: http://www.microsoft.com/en-us/download/details.aspx?id=29283 This is an excellent resource on how to make attunity...

How to Connect C# to SQLYOG?

c#,database,database-connection,connection-string,sqlyog

I would have added this as a comment but I don't have enough reputation. Connecting MySQL with Visual Studio C# SQLYOG is just a management application. Install a version of the MySQL connector. Install an instance of MySQL if you need to. Configure your database connection string to said local...

sqlalchemy mysql connections not closing on flask api

python,mysql,flask,sqlalchemy,database-connection

I ended up using the advice from this SO post: How to close sqlalchemy connection in MySQL I strongly recommend reading that post to anyone having this problem. Basically, I added a dispose() call to the close method. Doing so causes the entire connection to be destroyed, while closing simply...

SQL Server Native Client 11 ADO connection string for MS SQL Server 2014 with integrated login

sql-server,iis,asp-classic,database-connection,ado

Got the following connectionstring to work: strConn = "Provider=SQLOLEDB;DataTypeCompatibility=80;Integrated Security=SSPI;MARS Connection=False;Initial Catalog=myDB;Data Source=myServer" ...

Cannot connect to MySQL

mysql,database-connection

Follow this format: $user = "username"; $pass = "password"; $host = "localhost"; $db = "yourDbname"; $dns = "mysql:host=" . $host . ";dbname=" . $db; $dbh = new PDO($dns, $user, $pass); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); when you have to do a query (just an example): $theid = 10; $statement = $dbh->prepare('SELECT * FROM...

Connect Sproutcore App to MySQL Database

mysql,database,database-connection,sproutcore

SproutCore apps, as client-side "in-browser" apps, cannot connect directly to a MySQL or any other non-browser database. The application itself runs only within the user's browser (it's just HTML, CSS & JavaScript once built and deployed) and typically accesses any external data via XHR requests to an API or APIs....

Closing connections in java application which uses singleton frames

java,swing,singleton,database-connection

You shouldn't use a DB connection as an attribute in a singleton class. It's bad design. By definition, your singleton which is a GUI element shouldn't even be concerned about DB connections at all. What you should do is have a CRUDManager class (for database create/read/update/delete) that can be called...

Trying to read SQL Server Database for the first time but SqlDataAdapter.Fill(DataTable) is breaking it

c#,sql,sql-server,database-connection

You never set the connection string on the CMD object you create cmd.Connection = thisConnection The error message, although somewhat cryptic, does tell you what the error was... at line 0System.Windows.Markup.XamlParseException: 'The invocation of the constructor on type 'clayton.MainWindow' that matches the specified binding constraints threw an exception.' Line number...

Reader only select empty Fields from MySQL-Database - Error Message: The Value cannot be NULL Paramter: Item

mysql,nullpointerexception,c++-cli,database-connection

You never initialized the variable vRank to anything, of course it's still null. Did you forget to assign the result of GetString to vRank? while (myReader->Read()) { String^ vRank; vRank = myReader->GetString("rank"); ^^^^^^^^ ...

Connect to sqlplus with another linux user than oracle

linux,oracle,database-connection,sqlplus,privileges

Most likely it is due to incorrect privileges at OS level. The Oracle file in the $ORACLE_HOME/bin directory should have following privileges: -rwsr-s--x You could check it like: cd $ORACLE_HOME/bin ls -lrt oracle If you see any difference, then do: chmod 6751 oracle ls -lrt oracle ...

Multiple Models MVC With same Connection String

c#,asp.net-mvc,entity-framework,database-connection

Not too sure if that was the right way to word the question Well, considering you didn't actually ask a question in the title, I would say that no.. it's not. Apart from that, you really need to understand that asp.net MVC and entity framework are two entirely different...

Mongodb connection error ECONNRESET

node.js,mongodb,database-connection

I had a similar issue and it was due to corporate network restrictions which could be your case also Your network may not allow this type of connection to this external address and port...

Using datasource defined in blueprint in java to access oracle db

java,oracle,database-connection,apache-camel,datasource

dataSource = (DataSource)context.lookup(JNDIname); You have to use like this,otherwise create a comboPool and try to look from that...

Reuse DB adapter on bootstrap to set custom handler DB session in Zend Framework

php,zend-framework,database-connection

You don't need to create default adapter just before session handler try do $this->bootstrap('db'); I guess it will be enough for initializing db connection once.

MongoDB not waiting for connections on port 28017

mongodb,database-connection,port

If you want to use your mongod.cfg file for controlling your port use the following: # set the port number below port = 8080 dbpath = c:/data/db logpath = c:/data/log/mongod.log logappend = yes Please note though that the port you assign needs to be accessible and not in use or...

Android, Bluemix Error 401 : You are not authorized

android,connection,database-connection,http-status-code-401,bluemix

Solved. I downloaded the April jars, the most recent ones. That worked....

Compare Text Box field to Server-side DB using ASP.NET (VB.NET)

sql,asp.net,vb.net,visual-studio-2013,database-connection

Here's a simple example on how you could do it, there are various others like using an ASP.NET Memberhsip provider: Protected Sub submit_Click(sender As Object, e As EventArgs) Handles submit.Click Dim sql = "SELECT u.* FROM dbo.Users u WHERE [email protected] AND [email protected]" Using con As New SqlConnection(My.Settings.ConnectionString) Using cmd As...

MS Access - Your network access was interrupted

database,ms-access,access-vba,database-connection,server

The problem sounds like an unstable LAN connection OR changes the LAN location (e.g. new hardware or changs to admin settings) causing increased latency. If you have forms in the FE bound to BE tables the latency can cause the connection to be severed resulting in the error you see....

How to Fetch Values from JTable and add to database. Jtable and db columns are different

java,mysql,jtable,database-connection

"No value specified for parameter 2" You have only assigned the data of the first column to the PreparedStatement pstmt.executeUpdate(); pstmt.clearParameters(); Don't execute the above statements inside the column loop. You are tying to execute the update on the database once for every column. You should only execute the...

Use of MongoDB in a Windows Service

c#,.net,mongodb,database-connection,mongodb-csharp

The mongo driver does the connection pooling for you. There's no need to worry about it. You won't create a new connection on every save and you don't need more than a single MongoClient....

Django 1.7 Multiple Databases - OperationalError: (2006, 'MySQL server has gone away') Reset Connection

python,mysql,django,database-connection

django.db.connection refers to the default connection (based on the output of your attempts code). If you want the connection for a non default database, use django.db.connections, specifying the database name as the index i.e. from django.db import connections connections['BaSS'].close() That said, you shouldn't have to reset the connection manually by...

C# Mysql Connection must be valid and open

c#,mysql,connection,database-connection

The problem is that you don't store the connection that was returned from your factory property. But don't use a property like a method. Instead use it in this way: using (var con = Services.conn) { Services.conn.Open(); Services.DB_Select("..a short select statement..", con )); //Services.conn.Close(); unnecessary with using } So use...

How to declare sql variable in C#

c#,sql,sql-server,sql-server-2008,database-connection

Maybe this can help you, change your query (queryToExec) with: ALTER PROCEDURE uspWageDataByState @State NVARCHAR(2) AS DELETE TOP (CASE (SELECT COUNT(*) FROM [Test] WHERE [STATE] = @State) WHEN 0 THEN 1 ELSE (SELECT COUNT(*) FROM [Test] WHERE [STATE] = @State) END -1) FROM [Test] WHERE [STATE] = @State; if the...

PHP Scheduled Task with Windows Authentication

php,sql-server,database-connection,scheduled-tasks,windows-server-2008

I resolved the problem : In the tasks properties, the option "Do not store password" was checked. Without this option, everything works....

Getting a “Login failed for user Microsoft\[email protected]” without having specified username in connection string

c#,.net,entity-framework,database-connection,dbcontext

I needed to run Visual Studio as an administrator in order for my program to have access to localhost, and the user it used was coming from my Microsoft account. Hope this helps someone else running in to this!

Android Login using xampp server, phpmyadmin, eclipse

android,database,xampp,database-connection

The URL http://127.0.0.1/my_folder_inside_htdocs/check.php is work only from the emulator. To connect from device you have to use your ip address instead of 127.0.0.1 like http://168.155.2.2/my_folder_inside_htdocs/check.php

sapinst giving database connection error

database,installation,oracle10g,database-connection,sap

Just in case anyone faces the same issue, the problem lies with profile files, in profile files- Check for parameter named "SAPDBHOST" in DEFAULT.PFL. Entry should be as SAPDBHOST = if it doesn't exit add hostname of the database instance. Also, do check DEFAULT.PFL if the file name is "DEFAULT"...

What is the difference b/w a Session and a Connection in Hibernate?

hibernate,session,jpa,database-connection,connection-pooling

A Hibernate Session is just a transactional write-behind cache that translate entity state transitions into DML statements. The Hibernate Session can be connected or disconnected from the database. When it is disconnected, it cannot flush current pending entity state changes to the underlying database. There are multiple ways to associate...

vb6 can not connect oracle 11g r2 with ADO but can connect with SQL Developer

oracle,vb6,database-connection,oracle11gr2

You should install and configure Oracle Client. SQL Developer uses JDBC and seems to have a native driver.

JDBC performance when connection is stablished [closed]

java,database,performance,jdbc,database-connection

As has been suggested in various comments, you should load the records in batches. I don't know how your infrastructure is configured, but if you are using a cloud service, a database round trip can take on the order of hundreds of milliseconds. However, that may not be your only...

Cannot connect to local mysql

php,mysql,database-connection

Edit: Firstly, you are declaring constants, so there's no need for $ variables syntax. $connctn=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD) So make sure that you're using the correct data for all your constants. Also, your syntax for mysql_selectdb('BetaPoints') is incorrect. It's missing an underscore between select and db. Use either mysql_select_db('BetaPoints') or mysql_select_db('BetaPoints', $connctn) Consult,...

PowerShell connect to Postgres DB

postgresql,powershell,database-connection

With no client driver at all, you can simply execute the psql command-line then read and process its output. This is particularly useful when invoking it as psql -qAt and/or using \copy. Otherwise you must have some kind of client driver. Powershell has no built-in support code for the PostgreSQL...

Sql developer custom connection string

oracle,database-connection,connection-string,oracle-sqldeveloper

Please refer to the link..which shows how to connect using TNS keyword-value syntax http://docs.oracle.com/cd/B28359_01/java.111/b31224/jdbcthin.htm...

'Too many connections' created in postgres when creating a dashboard in Pentaho

postgresql,database-connection,pentaho

From the comments thread on the original question it seems you're using SQL over JDBC connections on your dashboard. This will create a different database connection for each query that needs to run and if they are somewhat slow you may reach the limit on the number of concurrent connections....

Cannot connect to an H2 file database on Red Hat

java,database-connection,h2,redhat

Ok - seems that there were some restrictions on the directory. Moved to a different one and it worked fine (though using the same file permissions).

Android app that uses SQL Ce database?

android,sql-server,xamarin,database-connection

No, SQL Server Compact only is available on Microsoft operating systems. For Android, you must use for example SQLite

Correct way to manage redis connections in django

python,django,database,redis,database-connection

From the official package documentation: Behind the scenes, redis-py uses a connection pool to manage connections to a Redis server. By default, each Redis instance you create will in turn create its own connection pool. You can override this behavior and use an existing connection pool by passing an already...

How to find a correct path in Swift

ios,sqlite,swift,database-connection

You can just drag and drop "contacts.db" into Project Navigator and after that you can find a path of that file this way: let sourcePath = NSBundle.mainBundle().pathForResource("contacts", ofType: "db") after that you can copy that file into document folder of your app and for that you need that document folder...

MySQL PreparedStatement Caveats

c++,mysql,resources,database-connection

Each prepared statement is parsed, optimized and stored in the database session, so it does take up resources while it is active and there is a max number of prepared statements per session. The resources taken vary with the DB engine and the driver. Depending on what exactly your prepared...

Can be closed or broken SqlConnection reconnected simply by calling Open()?

.net,database-connection,sqlclient,reconnect

(ConnectionState.Broken) The connection to the data source is broken. This can occur only after the connection has been opened. A connection in this state may be closed and then re-opened. (This value is reserved for future versions of the product.) i.e. you can close and re-open the connection with...

Data not coming in dropdown box from MySQL

php,mysql,database-connection

Your 1st while loop has reached the end of result set and hence running the while again is starting from the end and could not go further. You can fetch all the rows and store in a variable and then use that variable to populate both the dropdowns. <?php $cities...

SqlException: Cannot open database requested by the login. The login failed

c#,sql-server,web-services,visual-studio,database-connection

I have developed a lot of C# application that connects to SQL Server 2005/2008 database, and my connection strings are: Data Source=(local)\SQLEXPRESS; Initial Catalog=<database>; Integrated Security=SSPI for local databases Data Source=<ip address>\SQLEXPRESS; Initial Catalog=<database>; Integrated Security=FALSE; User ID=<user>; password=<password> for remote databases Just fill all "<>" fields with the correct...

SqlDependency is working with one but not with other table

c#,sql-server,database-connection,sqldependency

I've repeated your situation and wrote unit test (TwoTablesNotificationTest), but didn't find anything. It works fine for me. In this situation you could stop receive notifications from SqlDependency in case of destructor call of some DatabaseChangeAlert entity, because it has SqlDependency.Stop(connectionString) instruction. Thus, you have to call SqlDependency.Start after every...

Connecting to database on users computer

java,mysql,database-connection,netbeans-8

It is not possible to package a MySQL "file" in JAR. MySQL always runs as a server process that you can connect to using JDBC. The JDB URL dbc:mysql://localhost:3306/chutesandladders from your question contains the hostname localhost and the port 3306 where the MySQL server is running. If you want a...

How to set up 2 IBDatabase to 1 IBTransaction?

delphi,transactions,database-connection

This may occur if you started transaction explicitly. Every explicit transactions must be finished explicitly. So, if your connection is open explicitly, you should close it explicitly. You may use : //Commit(Stop) the transaction before open an other connection if Dm.Transaction.InTransaction then dm.Transaction.Commit; Note: In applications that connect an InterBaseExpress...

How to set up a dataqbase connection between MircroStrategy and OpenEdge 11.5 developer Studio

database-connection,openedge,microstrategy

You need to download and install the "SQL Client Access" software from Progress ESD / Download center. It's free but you need to check license key and serial before installing (available at the same place as the download). Make sure you install 32 or 64-bit drivers (depending on what Microstrategy...

database connection error after close then open again the data source

c#,database-connection

I have two suggestion for you: 1st : Please make use of using statement in Login.cs while making the connection. Please find the code below. private void button2_Click(object sender, EventArgs e) { using(SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\xchoo\Documents\Visual Studio 2012\Projects\WindowsFormsApplication_test2\WindowsFormsApplication_test2\Data.mdf;Integrated Security=True;Connect Timeout=30")) //con.Close(); { SqlDataAdapter sda = new SqlDataAdapter("Select Count(*)...

TeamCity 9.x Setting up an External Database with unnamed(NULL) MSSQL instance

database-connection,teamcity,teamcity-9.0

Thanks DevOps. My mistake, I was testing TeamCity locally. Problem was with the SQL Server Network Connection. TCP/IP was disabled for SQLEXPRESS Enable TCP/IP for SQLEXPRESS Open SQL Server Configuration Manager Go to Protocols for SQLEXPRESS under SQL Server Network Configuration. Right-click on TCP/IP and choose Properties. Set Enabled =...

Database connection pool[Hikari] initialize error

java,web-applications,database-connection,connection-pooling,hikaricp

Actually I got the answer, Hikari needs to set a connection test query, if thats done JDBC4 isValid will not get called. so just by adding property, I was able to make it work. mConfig.setConnectionTestQuery("show tables"); ...

Gracefully shutdown GWT super dev mode

gwt,database-connection,connection-pooling,shutdown,gwt-super-dev-mode

Several things: you should use the webapp lifecycle rather than JVM lifecycle. Use a ServletContextListener rather than a shutdown hook. this is an Eclipse issue, it always force-terminates processes, bypassing shutdown hooks. Once you use a servlet context listener, try reloading the webapp before killing the process. That said, I'd...

How can I set up a default DB2 schema In DBArtisan 9.6

db2,database-connection,dbartisan

Don't know about dbartisan, but you can do it the DB2-way. Either using the parameter currentSchema in the connection String, e.g. (Java example): jdbc:db2://localhost:50000/MYDB:currentSchema=MYSCHEMA; Or in your SQL using set current schema before your other commands: set current schema MYSCHEMA; select * from MYTABLE; ...