FAQ Database Discussion Community


Database Design Advice for a Social Network App Needed

database,database-design,database-connection,relational-database,database-schema
I am very new into backend stuffs like databases. That being said, I lack the database design knowledge. I am wondering how and what is the best design for my scenario. I am creating a social network app where the users can create groups and join other groups. Those groups...

Get database credentials from master database, then connect to different database

php,mysql,laravel,eloquent,database-connection
I have an instanced web application that uses different databases for every instance but uses the same files. What I want my application to do on boot: Get database credentials from master instance table. This instance table is in the default 'mysql' connection that I have defined in app/config/database.php. Connect...

MySQL I/O Performance in XAMPP

mysql,database,xampp,database-connection
Is there a way to monitor MySQL I/O performance in XAMPP? I am building an application that will interface with the MySQL database and for testing in XAMPP MySQL, I would like to be able to monitor I/O performance....

Connecting Android application to BlueMix stored DB2 Database

android,database,db2,database-connection,bluemix
How can I connect an Android application to a DB2 database stored in BlueMix? I know that some Java libraries are missing in Android, so I can't use JDBC to connect to the database. Any Idea?...

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

database-connection,firebird
Environment: Firebird 2.5.4-64bit, on Windows 8.1. I'm trying to write a C++ client using the C client API (using VS2013). I receive this error when preparing a SELECT statement on a table containing a DATE column (error when calling isc_dsql_prepare function) Dynamic SQL Error -SQL error code = -804 -Data...

Data not coming in dropdown box from MySQL

php,mysql,database-connection
I am trying to get the data from MySQL table to 2 separate dropdown box, but Only first dropdown is getting the list of cities from database, why 2nd dropdown not showing the list of cities. Here is the code in PHP <?php mysql_connect("localhost", "root", "") or die("Connection Failed"); mysql_select_db("flywest")or...

java with ms access not showing database result

java,database,ms-access,database-connection
I'm trying to connect with MS-Access using java but When I Compile this code it gives me no error and compile fine but it doesn't show any result while the database has records in it, table name and field name are also correct, anyone can please help me that what...

What happens if you close a closed connection?

java,jdbc,database-connection
I was reading my database access logic, and found that it was possible for the same connection to be closed twice in a row. Other than being a duplicate instruction, is there any reason I should be concerned about closing a connection after it's already been closed? ...

Connecting to connectionString in app.config

c#,sql,wpf,ms-access,database-connection
I have my connection string stored in App.Config <connectionStrings> <clear /> <add name="CTaC_Information_System.Properties.Settings.CIS_beConn" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=&quot;\\server\file\CIS Data\Database\CIS_be.accdb&quote;;Jet OLEDB:Database Password=123" providerName="System.Data.OleDb" /> Then when I go to my main.xaml.cs I type in the following: string cisconn =...

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

java,database-connection,connection-pooling,apache-commons-dbcp
Using BasicDataSource from DBCP if we do a getConnection() and in the finally block we close the connection does it really return the connection to the pool or does it close the connection. The snippet code I am checking is this try { Connection conn1 = getJdbcTemplate().getDataSource() .getConnection(); //Some code...

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

c#,sql-server,web-services,visual-studio,database-connection
I am developing an application in C# using Visual Studio 2013 and want to connect to my database. I've attempted to do this the code and connection string below. SqlConnection con = new SqlConnection(); con.ConnectionString = "server=.;database=[Demo Database Nav (5-0)];user=us;password=id"; I get the error message: System.Web.Services.Protocols.SoapException: Servern kunde inte behandla...

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

c#,asp.net,ado.net,database-connection
I'm getting the following error intermittently. There is already an open DataReader associated with this Command which must be closed first. I read that this can happens when there are nested DataReaders in the same connection, but in my case, I'm using the following code to execute all queries. private...

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 but i'm currently getting my head around MVC. I have multiple Entity Data Models(I'm not sure this is best practice, but it seemed logical), however only one is working as its presenting the error of 'Asaurus.Models.ConnectionString' already...

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

.net,database-connection,sqlclient,reconnect
In my method, if I find that connection (System.Data.SqlClient.SqlConnection) which I received has State = Closed or State = Broken which of the following approaches is correct? Call Open() to reconnect and continue with execution of subsequent statements. (Of course, I can also give the Open() pre-configured number of retries.)...

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

sql,asp.net,vb.net,visual-studio-2013,database-connection
I'm currently working on producing a quoting system that will run with a webform front end and be populated using a database on a server (ASP.NET). I'm reasonably competent in how databases work and how to write HTML/CSS but still a novice at linking the two together by running VB.NET...

Gracefully shutdown GWT super dev mode

gwt,database-connection,connection-pooling,shutdown,gwt-super-dev-mode
Quick explanation For a project I am involved with, created in GWT 2.7 using Eclipse Luna as IDE, in our server code we have a connection pool (backend is a mariadb database) configured with Hikari (http://brettwooldridge.github.io/HikariCP/). This all works fine, except for one thing.. The problem To avoid our database...

Closing connections in java application which uses singleton frames

java,swing,singleton,database-connection
I am creating a java application using SwingGUI. I have used singleton classes for frames (to avoid creation of multiple frames). Also, the class uses database connectivity. Now, at the start of the application (HomeScreen), I have created and initialised the DB connection and close it when the app is...

Using datasource defined in blueprint in java to access oracle db

java,oracle,database-connection,apache-camel,datasource
Below is my datasource <bean id="dataSource" class="oracle.jdbc.pool.OracleDataSource" destroy-method="close"> <property name="URL" value="jdbc:oracle:thin:@${host}:${port}:${dbname}"/> <property name="user" value="${user}"/> <property name="password" value="${pass}"/> </bean> <service ref="dataSource" interface="javax.sql.DataSource"> <service-properties> <entry key="osgi.jndi.service.name" value="jdbc/oracleds"/> <entry key="datasource.name" value="OracleDS"/>...

Connect to sqlplus with another linux user than oracle

linux,oracle,database-connection,sqlplus,privileges
I installed Oracle with sqlplus with user oracle (linux - CentOS). If I try to connect to database being oracle everything goes as expected (sqlplus / as sysdba for example), but I need to do the same thing (maybe not as sysdba, but as a user from database) being another...

Cannot connect to local mysql

php,mysql,database-connection
I am trying to connect to a database named BetaPoints. All of the credentials are located in a php file name EstablishAccess.php in the format of <?php define (DB_USER, "BetaPoints"); define (DB_PASSWORD, "password!"); define (DB_DATABASE, "BetaPoints"); define (DB_HOST, "hostname"); ?> I am trying to connect to the database with this...

ResultSet ->getString() crashes when value is >=16

c++,mysql,crash,database-connection,mysql-connector
ResultSet *search; .... .... search= prepareStatement->executeQuery(); while (search->next()) { cout << "Email Found: " << search->getString("EmailColumn") << endl; //crashes here } From the code above, calling getString() function actually gets the value from the database. But then it crashes the program. It displays the value then crashes the program. I...

upgrading SQLite-net to SQLite.net - create SQLiteConnection

xamarin,database-connection,sqlite-net
I used to open my SQLiteConnection in my shared project as following: var conn = new SQLiteConnection("MyDb.db3"); The constructor has been changed to the following signature: public SQLiteConnection(ISQLitePlatform sqlitePlatform, string databasePath, bool storeDateTimeAsTicks = true, IBlobSerializer serializer = null, IDictionary<string, TableMapping> tableMappings = null, IDictionary<Type, string> extraTypeMappings = null, IContractResolver...

Database connectionstring windows authentication but passing user and password

authentication,sql-server-2012,database-connection
I need some help. I'm trying to connect to my database. This is my connectionstring : <add name="DefaultConnection" connectionString="Data Source=KBV-SQL12-TEST\KBSQLSPTEST; Initial Catalog=KBSPT_aspnetmembership; User Id=KBOVDM01\KBSPT_EXTRANET; [email protected]" providerName="System.Data.SqlClient" /> The user is an Active Directory user. When I go to my SQLServer and log on as KBSPT_EXTRANET, I can op the SQL...

Unable to connect to database after migrating to Hibernate 4

java,spring,hibernate,database-connection,c3p0
I am trying to update hibernate from 3.6.10.Final to 4.3.6.Final. With 3.6.10 everything worked fine. I renamed the changed classes to the new classnames and get no errors on that side, but when I run the webapplication I get an error: 2015-06-12 10:44:35.345 ERROR SchemaUpdate:201 - HHH000319: Could not get...

Cannot connect to mysql server from java

java,mysql,database-connection
I get the error "Communications link failure" at this line of code: mySqlCon = DriverManager.getConnection("jdbc:mysql://**server ip address**:3306/db-name", "mu-user-name", "my-password"); I checked everything in this post: I increased max-allowed-packet in my.cnf in etc/mysql: max_allowed_packet = 5073741824------ [mysqldump] max_allowed_packet = 1G The bind-address is: 127.0.0.1 All timeout values are equal to a...

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

sql-server,iis,asp-classic,database-connection,ado
I'm currently trying to migrate a working web solution from an environment on IIS 7.5 and MS SQL Server 2008 R2 (both on Windows Server 2008 R2 x64) to IIS 8.5 and MS SQL Server 2014 (both on Windows Server 2012 R2). I can't quite get my ADODB connectionstring working...

Can't connect to MySQL server at 127.0.0.1 using c3p0

java,mysql,database-connection,c3p0
Trying to connect to MySQL server using the following code in Java with c3p0: comboPooledDataSource = new ComboPooledDataSource(); comboPooledDataSource.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/" + Dbname); comboPooledDataSource.setUser(Username); comboPooledDataSource.setPassword(Password); comboPooledDataSource.setInitialPoolSize(15); comboPooledDataSource.setMaxPoolSize(20); comboPooledDataSource.setMinPoolSize(10); connection = comboPooledDataSource.getConnection(); Although I have checked that the DB is up and running and I can...

AngularJS without framework

php,ruby-on-rails,angularjs,frameworks,database-connection
I'm a newbie to AngularJS, and I've created an web application by using it. I would like to know whether it is possible to create a Web application in AngularJS with database connectivity and without using any framework (like Ruby on Rails or PHP or any other)?...

database connection error after close then open again the data source

c#,database-connection
I am getting exception while connecting to database, I am opening the connection in Login.cs file and then closing it here, after that openinig the connection at Select_Item.cs, however I am still getting the error saying that: A database with the same name exists, or specified file cannot be opened,...

I cannot get my logon to execute

php,mysql,apache,database-connection,server
I have a logon form which reads as <h1>Log In</h1> <div style="width: 80%;margin-right: auto;margin-left: auto"> <form action="checklogin.php" method="POST"> <p> User ID:<br /> <input type="text" name="username"><br /> Password:<br /> <input type="password" name="pass" ><br /> <br /> <input type="submit" value="Login"> This then goes to validate as follows // Connect to server and...

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

c#,database,database-connection
I am developing a MVVM WPF application that requires storing large amounts of relational data. I would like to use a database platform, as it will simplify the task and the resulting software would be more robust. There are concerns, however that the users will not be able to install...

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

php,mysql,mysqli,database-connection,php-include
Is it secure to use a PHP file with connection parameters, and include that file to the page? example: include("connect.php"); connect.php: $con=mysqli_connect('localhost','root','','database') or die(mysqli_connect_error($con)."- In line: ".__LINE__); mysqli_set_charset($con,'utf8'); ...

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

database-connection,teamcity,teamcity-9.0
I'm evaluating TeamCity 9.0.4 and using HSQLDB. Now trying to setup MS SQL Server 2014 as External Database.I don't have a named instance(NULL). So I tried the following connection URL connectionUrl=jdbc:sqlserver://<host>:1433;databaseName=<database name> connectionProperties.user=<user> connectionProperties.password=<password> When I trying to load the build server I'm getting this message. TeamCity is starting Continuing...

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

vb.net,database-connection,ms-access-2010
Having some issues with the myDataAdapter.fill line, getting the error "syntax error in From clause" looked around at other solutions and none have worked, most seem to be about reserved words - all out of ideas, help! 'retrieve the connection string from the ConnectionString Key in Web.Config 'string connectionString =...

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

mysql,nullpointerexception,c++-cli,database-connection
If I try to select the Database from a MySQL Database I get a Error Message: The Value can not be NULL. Paramter: item (In German its: Der Wert darf nicht NULL sein. Parameter: item) So that means the Reader only select empty fields - he "selects NULL" - but...

Mongodb connection error ECONNRESET

node.js,mongodb,database-connection
When I tried to connect to mangolab, I get Err ECONNRESET var mongo = require("mongodb").MongoClient; var assert = require('assert'); var url = "mongodb://username:[email protected]:port/databaseName"; mongo.connect(url, function(err, db) { console.log(err); }); I have put right info in connection url. please help. Thanks in advance....

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

postgresql,database-connection,pentaho
I was creating a Dashboard in Pentaho PUC which uses a postgres connection as the data source. Most of the time this causes the postgres to say Too many clients already in Postgres' SHOW max_connections; Query shows maximum connections of 200 I used this query select * from pg_stat_activity;. From...

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

db2,database-connection,dbartisan
I am using DBArtisan 9.6.0 for accessing an IBM DB2 database. When entering a SQL query, DBArtisan forces me to prefix the schema name explicitly before every table name. I would like to set up a default schema, but searching the DBArtisan user guide for "default schema" no longer returns...

Powershell Error - Null/Empty Argument

sql,sql-server,powershell,database-connection
I have a small powershell script that is meant to get column ServerName from a remote SQL database called, Hal0Test > from table, ServerList. However, I can not figure out this Powershell Error. Newest Code: Write-Output " `n Start of Hal0 `n"; $connectionString = "Server=QAUTILITYDB01;Database=Hal0Test;Integrated Security=True;" $connection = New-Object System.Data.SqlClient.SqlConnection...

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

hibernate,session,jpa,database-connection,connection-pooling
I want to clear the basic 3 points, Does beginning a new database transaction on an old session obtains a new connection and resumes the session? Does committing a database transaction disconnects a session from the JDBC connection and returns the connection to the pool? From Hibernate Documentation, earlier versions...

PowerShell connect to Postgres DB

postgresql,powershell,database-connection
Can you please advise whether there's a way how to connect to Postgres SQL DB from PowerShell WITHOUT installing any DB driver? I'm looking for solution which would be able to connect using only .NET database capabilities. Thanks. Matthew...

Android Login using xampp server, phpmyadmin, eclipse

android,database,xampp,database-connection
I insert values in database (phpmyadmin) and when I try to connect from my USB Android Device ... nothing happens. package pack.coderzheaven; import java.util.ArrayList; import java.util.List; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.ResponseHandler; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.BasicResponseHandler; import...

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

python,mysql,django,database-connection
I am getting errors when trying to reset the connection to a remote database. It is not the default database. It seems that connections.close only has a affect on the default Database configuration. Am I missing something or is there a way to reset the connection to a specific database...

PHP Scheduled Task with Windows Authentication

php,sql-server,database-connection,scheduled-tasks,windows-server-2008
I am working on an PHP application hosted on Windows Server 2008. Sorry if some informations are not clear but this work has been made by another developer and I can not contact him. There is a scheduled task executed every week to synchronize some data from a SQL Server...

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

database-connection,openedge,microstrategy
Would someone kindly help me. I need to set up a db connection between OpenEdge Developer version 11.5 and Microstrategy. I have managed to set up a DNS and a connection between sql server and Microstrategy however struggling with progress. Any information would be of great help Thank You.

How connect database class with an array connect

php,database,database-connection
How can i connect into another script my database class function? I need to make it without change every file with the connection file. Here is my config file(conn.php): define('DB_HOST', "localhost"); define('DB_TYPE', "mysql"); define('DB_USER', "user"); define('DB_PASS', "123456"); define('DB_NAME', "dbuser"); Here is the config I need to change to the DEFINE...

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

oracle,vb6,database-connection,oracle11gr2
I can not connect Oracle 11g r2 with ADO in VB6. But I can connect Oracle database with Oracle SQL Developer with same parameter. How do I check this problem? Here my connection string: (The password is hide) connstr = "Provider=OraOLEDB.Oracle;dbq=[same name]:1521/[same name];Database=[same name];User Id=evo;Password=*****;" and this parameter in SQL...

Connection parameters in SQL Developer

oracle,connection,database-connection,oracle-sqldeveloper,sqlplus
How to establish connection to remote DB in Oracle SQL Developer if there only login, password and DB name are available? Connection is successful in SQLPlus and PL/SQL Dev, but SQL Developer require hostname and port, but I don't know them....

connecting to a database through JDBC [duplicate]

java,mysql,jdbc,database-connection
This question already has an answer here: Connect Java to a MySQL database 8 answers I am trying to follow a tutorial in a book on connecting a program to a database with JDBC. I am confused on what the first block of code is doing in the class....

Why my mysql transaction is not working properly?

php,mysql,mysqli,transactions,database-connection
I've been reading and gathering information for 2 days already and I give up. I have no clue why my piece of simple code is not succeeding. I want to insert data from one form into two tables and YES I know there are exactly same problems described here and...

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

php,zend-framework,database-connection
In bootstrap: public function _initSession() { $config = Zend_Registry::get('config'); // application.ini $params = $config->default->resources->db->params->toArray(); $db = Zend_Db::factory($config->default->resources->db->adapter, $params); Zend_Db_Table_Abstract::setDefaultAdapter($db); $config = array( 'name' => 'session', 'primary' => 'id', 'modifiedColumn' => 'modified', 'dataColumn' => 'data', 'lifetimeColumn' => 'lifetime' ); Zend_Session::setSaveHandler( new...

How do I close the cursor created in a database link(ORA-02080)?

sql,oracle,database-connection,database-link,database-cursor
I perform the following sequence of steps(step-wise using F-9) in Oracle SQL Developer: create database link mydb connect to my_schema identified by mypwd using 'connection1'; select * from users where id = 1; rollback; ALTER SESSION CLOSE DATABASE LINK mydb; drop database link mydb; I get an error when I...

Correct way to manage redis connections in django

python,django,database,redis,database-connection
I have a django project that uses a redis (just one db in redis). Currently I do this: In my settings.py file, I have: from redis import Redis REDIS_CONNECTION = Redis() Anytime I want to call this connection (on my many views.py file in different apps in the project) I...

How to find a correct path in Swift

ios,sqlite,swift,database-connection
I got this code from the documentation, I can't find the path to my file, I need to copy the "contacts.db" file from Supporting Files Folder to the app in the device not in the simulator for offline use. func copyItemAtPath(_ srcPath: String, toPath dstPath: String, error error: NSErrorPointer) ->...

Java, passing database connection into different classes.

java,database,db2,database-connection
I don't understand the purpose of DatabaseAccess class. I'm curious about how did the object name "conDA" contains the database connection even without using the getConnection() method I created. Example "con2 = new Connection2(conDA);" how is that "conDA" object name can be understood as a connection of database? Here are...

Logging into a PuppetDB instance like a typical SQL instance?

database-connection,puppet-enterprise
I'm trying to find if there is a way to log into a pe-puppetdb instance like you would with say, a mysql instance. AKA mysql -u username -p I have looked around but am only really seeing the ability to curl into the database but would like to actually interact...

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

mysql,scala,playframework,database-connection,config
I am writing a scala application using the Playframework. I don't want to write the database configuration in the application.conf file. Instead I have a function similar to the one given below. I want to send the configuration parameters as arguments of a function. Then I want create a connection...

Testing multiple connections to SQL Server

sql-server,testing,load,database-connection,connection-pooling
We're migrating SQL2005 Enterprise to SQL2012 Enterprise (on a new server too, from WIn2003 to Win2012). Is there a way to test multiple connections to the database to prove it can take the same load as the previous server? The application is a website, .Net3.5 with Min and Max pool...

SqlDependency is working with one but not with other table

c#,sql-server,database-connection,sqldependency
I have written this class to automate SQLDependencys public class DatabaseChangeAlert { private String connectionString; private SqlConnection sc; public event EventHandler<DatabaseChangedEvent> DatabaseChangeEvent; private String tabelle; private String query; public DatabaseChangeAlert(String tabelle, String conString) { try { this.tabelle = tabelle; this.sc = new SqlConnection(conString); ;//new SqlConnection(GlobalResources.ConnectionString); this.connectionString = conString; String sel...

Android, Bluemix Error 401 : You are not authorized

android,connection,database-connection,http-status-code-401,bluemix
I downloaded the sdk from here, created an application but when i run the app the logcat notifies: Error 401, Failure: You are not authorized. I tested the Bluemix app with the sample code you can find here, obviously switching the default parameters with my app's ones....

How to get multiple database connections dynamically?

php,codeigniter,database-connection
I need 3 database connections with Codeigniter. I don't know any information about host, username or password of those databases. this means the user has to send these information using a form. What I know, is that can add another array such as $db['another_db'] to config/database.php but how would I...

MongoDB not waiting for connections on port 28017

mongodb,database-connection,port
I just started with MongoDB on Windows 7. I can connect to port 27017, but I'm not getting the "admin web console waiting for connections on port 28017" message, so when I visit http://localhost:28017/, nothing appears. I get the following messages in the console: 2015-06-02T17:54:43.271-0700 I CONTROL Hotfix KB2731284 or...

sapinst giving database connection error

database,installation,oracle10g,database-connection,sap
I am trying to install SAP R-3 ABAP, where databse instance is on one machine and central instance on different machine. Database instance installation is finished but when trying to install central instance when sapinst tries to connect from Central Instance to database instance following error comes up WARNING 2009-05-02...

Database connection pool[Hikari] initialize error

java,web-applications,database-connection,connection-pooling,hikaricp
Am trying to configure HikariCP for my web application, am not using any frameworks, its plain simple java web app. When i tried establishing connection through normal JDBC it was successful, i was able to perform all database operations. However, with a CP when am trying to get an connection...

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

c#,database,ms-access,database-connection,connection-string
For the properties: Persist Security Info=true and Persist Security Info=false Can you tell me what is the difference between them, and if I don't put it in my connection what will happen? connect.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=C:/Users/Nourah/Downloads /Phase3/Salary.accdb; Persist Security Info=False;"; ...

Connect Sproutcore App to MySQL Database

mysql,database,database-connection,sproutcore
I'm trying to build my first Sproutcore App and I struggle to connect it to a MySQL-Database or any datasource other than fixture. I can't seem to find ANY tutorial except this one from 2009 which is marked as deprecated: http://wiki.sproutcore.com/w/page/12413058/Todos%2007-Hooking%20Up%20to%20the%20Backend . Do people usually not connect SC-Apps to a...

Connection String of MS Access database

c#,ms-access,database-connection
I have developed a Windows application in C#, and its database is in Access 2010. I have the database connection string, but it gives an error: OleDbException Was Unhandled Please suggest me what is the problem & its solution. con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source="\\dtinaurdsna02\\LE-IN\\Admin\Quality Rating\\Quality_Rating_Tool\\Quality_Rating_Tool.accdb";Persist Security Info=True;"); ...

Connecting to database on users computer

java,mysql,database-connection,netbeans-8
I am currently using Netbeans 8 and trying to make the MySQL database connect to the program without downloading MySQL on to the users computer or running a server, so the MySQL file must be local. How may I proceed is there a way to package with the jar of...

JDBC performance when connection is stablished [closed]

java,database,performance,jdbc,database-connection
I want to reduce the time of part of project that currently takes 2 hrs. How it has been coded is it goes and take out almost 700,000 UID from one table and pass it to 16 different threads. Each thread then connect to JDBC and fetch a row for...

Laravel 5 passing database query from controller to view

php,laravel,model-view-controller,database-connection,views
I'm new to Laravel 5 and MVC frameworks in general. I having trouble getting results from a database query and passing it to my blade view. Here is what I have for a controller function ... public function show(Project $project) { $technologies = DB::select('select * from technologies where id =...

Android app that uses SQL Ce database?

android,sql-server,xamarin,database-connection
Is possible to build an app for android that uses SQL CE database? At the moment i have a .sdf database and no ideas on what programming languages i have to use to build the app i need. Is possible to do that using Xamarin framework?

SQL Connection string Provider name

c#,sql-server,database-connection
This is more of a generic question , I am building a report Generator : public ReportGenerator(IReportGeneratorConfig config) { Configuration = config; ImagePaths = new Dictionary<string, string>(); ReportErrors = new StringBuilder(); DatabaseForReportQueries = DatabaseFactory.CreateDatabase(Configuration.DatabaseName); using (System.Data.Common.DbConnection conn = DatabaseForReportQueries.CreateConnection()) { //get the connection string for use with the report directly....

Use of MongoDB in a Windows Service

c#,.net,mongodb,database-connection,mongodb-csharp
I need to write a Windows Service in C# that stores data to a MongoDB database. My current code is: var databaseName = MongoUrl.Create(connectionString).DatabaseName; var server = new MongoClient(connectionString).GetServer(); _mongoDatabase = server.GetDatabase(databaseName); var collection = _mongoDatabase.GetCollection<IMessageWrapper> ("Test"); collection.Save(test); When using SQL databases it is usually very expensive to open a...

Mysql Host information not showing using PHP

php,mysql,database-connection
I'm following php/mysql tutorial book. The sample script connects me to my mysql database doesn't show what it should. The line in question is ("Host information: %\n", mysqli_get_host_info($mysqli)); There rest of the code <?php $mysqli=new mysqli("localhost", "root", "Im not pasting this", "or this"); if (mysqli_connect_errno()){ printf("Connect failed: %s\n", mysqli_connect_error()); exit();...

How to set up 2 IBDatabase to 1 IBTransaction?

delphi,transactions,database-connection
I have one IBDatabase in DataModule linked with my IBTransaction. In one module of project I need to control the persistence in two database. For this, I am adding the second IBDatabase this way: constructor TConnections.Create(AIBDatabase: TIBDatabase); begin if AIBDatabase = nil then raise Exception.Create('The base connection is needed!'); inherited...

sqlalchemy mysql connections not closing on flask api

python,mysql,flask,sqlalchemy,database-connection
I have an api I have written in flask. It uses sqlalchemy in order to deal with a mysql database. I don't use flask-sqlalchemy, because I don't like the way that the module forces you into a certain pattern for declaring the model. I'm having a problem in which my...

Java “Connection” Class does not connect to the DB

java,mysql,netbeans,connection,database-connection
I'm trying to connect my DB with a Java Application i'm creating. What I got so far: public class DBConnect { public void DBConnect() { try { DBConnect DBConnect = null; String url = "jdbc:mysql://localhost:3306/ähs_system"; String uName = "**"; String uPass = "**"; // Connection conn = DriverManager.getConnection(url, uName, uPass);...

Cannot connect to an H2 file database on Red Hat

java,database-connection,h2,redhat
I have written a Java application which creates an H2 file database (1.4.184). It works fine on Windows and Ubuntu. When I deployed it to the Red Hat server, it creates the database but is unable to connect. It just hangs and doesn't exit with any exception. This is the...