database-connection

Connection string for remote SQL server 2008 without SQL Management Studio

故事扮演 提交于 2019-12-25 08:57:10
问题 I know its a classic problem, but I am too novice to even comprehend the basics (sorry). I have this ASP.NET "Website" with databases (SQL Server 2008), which I am trying to deploy on a Remote Host Server (HostGator) using WebSite Copy tool of VS 2010. In VS 2010, I could grab the Connection string directly through the "property" of the database, which turned out to be: Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Users\myName\Documents\Visual Studio 2010\WebSites\Experiment\App_Data\data

All used connections in pool are sleepy & new connections are created

▼魔方 西西 提交于 2019-12-25 08:23:03
问题 We are using c3p0 pooling along with Hibernate . But hibernate is not re-using the connections in the pool. When I see mysql-workbench for client connections, I can see most of them are in " Sleep " state. The pool keeps growing over time, by my specified increment, until I eventually run out. Here's the snippet from the data configuration: persistenceMap.put( "connection.provider_class", "org.hibernate.connection.C3P0ConnectionProvider" ); persistenceMap.put("hibernate.c3p0.min_size", "1");

php wont connect to mysql

一世执手 提交于 2019-12-25 07:53:13
问题 I am trying to create a PHP file that connects to a mysql database and inserts data into the database. However I am having difficulty getting it to connect to the database. I get the following error ( ! ) Notice: Undefined variable: dbname in C:\wamp\www\php_Final_kk.php on line 34 Call Stack ( ! ) Notice: Undefined variable: sql in C:\wamp\www\php_Final_kk.php on line 52 SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) My username and password are

How to implement a listener for access events of a sqlite database in Java

怎甘沉沦 提交于 2019-12-25 06:36:02
问题 I'd like to display a 'indeterminate JProgressBar' in my Java application each time it accesses the SQLite database for reading / writing. I think the most important thing is to realize a trigger signal from the database. Then implement a listener to this trigger to display the progress bar. I use SQLite with the Xerial JDBC driver with JDK 1.7. The application is 'stand alone'. The SQLite database is on the hdd. I have a good basic understanding of Java, but i'm no expert. Approaches with

MS SQL Server 2005 Express x86 - its port is unreachable - help

℡╲_俬逩灬. 提交于 2019-12-25 03:54:45
问题 I have just installed the MS SQL Server 2005 Express and, of course, I am trying to connect it with my test app but the thing is ... for some reason I cannot connect it I have already checked its port with the CP "netstat -an" but the outcoming list does not contain any 1433 port at all :( The SQL service is running I could check it with the OS Services but its port is unavailable :( I have installed MS SQL Server 2005 Express Management Studio but for some reason it connected the MS SQL

Cannot connect to azure db via SqlConnection

爷,独闯天下 提交于 2019-12-25 03:51:51
问题 I have a webiste hosted on Azure and I have uploaded my db to azure via SSMS 2012 and I can connect to the azure server and db in SSMS and when i create a connection to the db in Database Explorer and test the connection it says it works fine. I cannot access the management section for the db in azure management portal (I can do this for another db but I have the same problem when accessing that one via the website as well) I tried giving the Login 'ashley' the db_owner privilege EXEC sp

My dbcontext doesn't expect any connection string as an input

旧时模样 提交于 2019-12-25 03:27:54
问题 I have 4 layer in my application UI , DomainClass , Model(DBCntext) , Repository . In repository i have an abstract class like this : public abstract class GenericRepository<C, T> : IGenericRepository<T> where T : class where C : DbContext, new() { private C _entities = new C(); public C Context { get { return _entities; } set { _entities = value; } } public virtual IQueryable<T> GetAll() { IQueryable<T> query = _entities.Set<T>(); return query; } public IQueryable<T> FindBy(System.Linq

Jubula PostgreSQL Database connection failed

南楼画角 提交于 2019-12-25 03:19:17
问题 I get this error when I try to connect to a Jubula database. 2000 Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.DatabaseException Exception Description: Configuration error. Class [org.postgresql.Driver] not found. I guess EclipseLink does not know how to connect. (Using: Eclipse 4.4 for Testers) Can someone tell me how can I install the Postgre-JDBC driver's jar, in order to make it work? 回答1: Okay, I've found it;

Can a flex web app access a sqlite database?

主宰稳场 提交于 2019-12-25 03:10:58
问题 I'm making an application (web based) using flex and i have a requirment to access the SQLite database on the local system. There is no server running and i've decided to give them the link to the html file and see how that works out. So in the root directory, there will be all required swf, html files, etc and a .db file. Can i access that database thro the flex web application ? Please help. 回答1: No. Flex can access an SQLite database via the Air SDK, but you are out of luck when running

Is the performance of non singleton sql connections better?

*爱你&永不变心* 提交于 2019-12-25 02:58:53
问题 This is a follow up question to: Is it necessary to deconstruct singleton sql connections? As a few comments there stated it is bad design to use a singleton for sql connection instead of doing multiple usings. What intrigues me there though is one statement that the performance of the using variant is better than that of the singleton variant. Now as stated by me that it is a bad design is clear to me (I know most pros and cons for singletons there...especially the cons). What surprised me