I'm running a single-threaded Rails 5.0 application through the "rails console", with the below configuration in config/database.yml for my development environment: development: adapter: postgresql encoding: utf8 database: sims username: postgre
I have replaced the bottom line with the code that is in comments to make the location dynamic but it doesn't work. I have also changed the app.config file accordingly but still no hope. Could someone please guide me. // public string str = @"Data So
I have been through these questions - choose a db connection pool , Is DB connection pooling all that important and java - DataSource for standalone application - no application server and those don't answer my curiosity. What I have is a standalone
Normally I'm using the statements: using (SqlConnection connection = new SqlConnection("Data ...")) { .... } to define areas where I use sql commands. Now for a specific application I'm considering putting the sql connection into a singleton ins
I wrote a qt small console utility for testing database connectivity, the code block is: db.setHostName("hostIP"); db.setDatabaseName("name"); db.setUserName("uid"); db.setPassword("pw"); db.setPort(1521); while(tru
What options exist to query RMS files in OpenVMS? The context for the query/access would be for BI & reporting. Currently, a very old FOCUS (Infomation Builders, v. 6.9.8) is in use, and that only from within the native OpenVMS command line shell. My
I'm quite a newbie, just trying to learn some new things. I've recently started learning c# etc and I'd also like to create a new SQL Server database using SQL Server Management Studio. The thing is that for some reason I am not able to connect to th
Problem Please note that I changed details for security purposes. However, the problem remains intact. I installed an Oracle 11g database on a server at location, say, herp-devDV.derp.edu. Now I have another Oracle 11g database on a server at locatio
I'm writing a program in C# using Visual Studio 2010. I need to collect data from two tables which are in two different database. I'm using Microsoft SQL Server Management Studio to view the data. Both database are on the same server. I wrote a SQL q
I have a database project, Im trying to connect to database from netbeabs and I created a connection class which is ; public class Global { public static Connection createConnection() { Connection conn = null; System.out.println("Checking if Driver i
I'm pretty new at php and I'm getting an error whenever I try to load a php page that requires access to the database I set up on phpMyAdmin Here is the error: Database connection failed: Can't connect to local MySQL server through socket '/tmp/mysql
I was recently asked this question in an interview. Q1 : Where should you close a database connection in a servlet? A : Ideally, and in most practical applications that I have come across, a database connection is closed in the Finally block. Q2: Why
I'm just trying to run a sample hivejdbc client program but it's giving me an out of memory error. import java.sql.SQLException; import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; import java.sql.DriverManager; public c
I am trying to connect to database at window form level in Studio 2010/VB.Net. I am using two different databases in Sql 2008r2. One database I am using to populate records at form load event (run time) and when users pick their selection or any modi
Why do I need Transaction in Hibernate for read only operation? Does the following transaction put a lock on db? Example code to fetch from db: Transaction tx = HibernateUtil.getCurrentSession().beginTransaction(); // why begin transaction? //readonl
We have two DBs on different servers - S1 is a remote server with a DB we use for login authentication, S2 has our application and app-database. When you login, we check the user against S1 and then create a user object in S2 using some S1 data. Is t
I was always in assumption that it is always a good practice to close database connection, regardless of database/ORM, like mysql_close(), Propel::close() etc. With reference to one of my other question and some other research on Internet, I came to
My collegue helped me with starting programming in c# although I had no experience but I like it. All went well until I came across some problems we both can't fix. He uses SQL himself but started me up with LINQ. To do a LINQ-query I use this object
Getting java.sql.SQLException java.sql.SQLException: General error at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6986) at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114) at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3110
hey can someone tell me what is the problem here? SqlConnection sqlConn = new SqlConnection(); sqlConn.ConnectionString = "server=zekyakad-7727\\sqlexpress.master.dbo;database=master;"; sqlConn.Open(); //error line Error msg: A network-related o
Suppose a withdrawal transaction of 6000 is happening on account ABC(fund:1000) and at the same time a withdrawl of 8000 is carried out from ATM. Then how will the transaction be managed. Will the database open just one connection and doesnt allow ne
I have a class connection, but it doesn't work. It does work in the same network (intranet), but it doesn't work over the internet. It is a SQL Server - i have a user, a pass- and this privated ip, public ip is 189.148.67.149 I had configured SQL Ser
I've a problem with database, and here is a scenario I'm dealing with every day: usually application can deal with traffic etc. but several times a day I'm dealing with performance issue. When it's happening stored procedures increase their execution
With MS Access single user, Is it good practice or okay to maintain a persistent connection throughout? psuedocode: app.start(); access.connect(); domanymanystuff(); access.disconnect(); app.exit(); --- OR ---- app.start(); access.connect(); doonetas
Basically, if I'm doing the following: using (IfxConnection connection = ConnectionManager.GetConnection()) { connection.Open(); ... if (connection != null) connection.Close(); //Is this necessary? } Note: IfxConnection is an IBM class that inherits
i want my database to support one company haveing many users how can i do that? example users table(UID,username,password) company table(CID,companyname,usersthatistheownerofthecompany) how can i do that? what should i do ? should i make an array in
I have a program that stores user projects as databases. Naturally, the program should allow the user to create and delete the databases as they need to. When the program boots up, it looks for all the databases in a specific SQLServer instance that
I have a DataEnvironment component in my VB 6 application. I cant configure the DataEnvironment connection to use trusted connection without ask me how to connect. I could set prompt to never appear, but it doesnt connect becouse it doesnt use truste
I have certain initializing functions that I use to set up audit logging on the DB server side (ie, not rails) in PostgreSQL. At least one has to be issued (setting the current user) before inserting data into or updating any of the audited tables, o
Our website connects to a database correctly when running the website locally using the built-in web server. But, when we deploy the site to our server running IIS, we get a database connection error. The database server is different from our IIS ser