database-connection

SQL Server 2012: Login to PC-NAME\SQLEXPRESS works, but not to local/(local)

感情迁移 提交于 2020-01-04 05:28:46
问题 I'd like to login to my SQL Server 2012 Express with servername local or (local) but it doesn't work. The only servername which works is PC-Name\SQLEXPRESS . local/(local) has to work somehow because I have to use the following connection string: Data Source=localhost;Initial Catalog=... 回答1: I've reinstalled it and ensures to select "default instance" instead of "named instance" during the installation. Now everything is fine again. 回答2: I think I see what you're trying to do now. If you

Visual Studio 2008 (C#) with SQL Compact Edition database error: 26

我的梦境 提交于 2020-01-04 04:09:06
问题 A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) I've created a SQL compact database, included it in my application, and can connect to the database fine from other database editors, but within my

EclipseLink JPA 2.1 User supplied connection

柔情痞子 提交于 2020-01-04 02:57:05
问题 I would like to use EclipseLink as my JPA engine. We are using a subclass of java.sql.Connection and I would like to know if I can force EclipseLink to use my connection. I would like to set the connection object programmatically. Something like MyConnection conn = new MyConnection(JDBC_URL, USR, PWD); EntityManagerFactory factory = Persistence.createEntityManagerFactory(conn); 回答1: You can set a custom connection programatically using the following code: Map properties = new HashMap(); //

EclipseLink JPA 2.1 User supplied connection

你。 提交于 2020-01-04 02:57:03
问题 I would like to use EclipseLink as my JPA engine. We are using a subclass of java.sql.Connection and I would like to know if I can force EclipseLink to use my connection. I would like to set the connection object programmatically. Something like MyConnection conn = new MyConnection(JDBC_URL, USR, PWD); EntityManagerFactory factory = Persistence.createEntityManagerFactory(conn); 回答1: You can set a custom connection programatically using the following code: Map properties = new HashMap(); //

which to use OLEDB or ODBC for SYbase

对着背影说爱祢 提交于 2020-01-04 02:34:07
问题 I am not able to figure out which drivers should I use. Even I don't know what I have. When I am trying to make the connection string through the .udl file it only shows SYbase ASE OleDB Provider while in install folder I can see in driver list Syabse Ase ODBC driver but in connection string it is unable to pick up the driver, here I used Driver = (Sybase ASE ODBC Driver) What should I go for? Thanks 回答1: Using udl you have only the possibility to generate a connection string that uses an

Am I closing this SQL connection in a C# function appropriately?

烈酒焚心 提交于 2020-01-03 18:37:08
问题 In an attempt to close my question on connections remaining open and exceeding the maximum pool, I'm trying tor rewrite the function that is used to connect to our database. The function exists within a homegrown compiled library. using reflector I can see the code looks like this: public SqlProvider([Optional, DefaultParameterValue("")] string StrConnection) { string str; if (StrConnection == "") { str = ConfigurationSettings.AppSettings["ConStr"]; } else { str = StrConnection; }

What is the good design pattern for connection pooling?

时光总嘲笑我的痴心妄想 提交于 2020-01-03 17:23:31
问题 What is the good design pattern for implementing one connection (or generally resource) pool? For example, one tomcat server connects to one mysql server, and all the requests share a mysql connection pool on tomcat server. I have search for some time, some people proposed to use Singleton or put the initialization code inside some static block. But others said singleton is bad. So, what should be a right design pattern to use for connection pooling? Thanks. 回答1: Object (Resource) Pool is a

java.sql.SQLException: ORA-01005: null password given; logon denied

只谈情不闲聊 提交于 2020-01-03 11:59:09
问题 I'm getting the follwing exception while trying to connect to a database: java.sql.SQLException: ORA-01005: null password given; logon denied at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:392) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:385) at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:938) at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:480) at oracle

Why does Oracle/Java creates multiple records in one execution?

半城伤御伤魂 提交于 2020-01-03 05:10:07
问题 I'm debugging a java based web application. There is an issue reported from our production environment where multiple records were inserted in table, but other records was not valid Production issue results: Header Table HDR_NO HDR_COL1 HDR_COL1 DOCUMENT_DATE HDR44  68     327    6/6/2014 14:22 HDR45  68     327    6/6/2014 14:24--invalid data HDR46  68     327    6/6/2014 14:24--invalid data Detail Table DTL_NO HDR_NO DTL_COL1 DTL_COL1 DTL76  HDR44  SR1439  4337 DTL77  HDR45  SR1439  4337-

Simple secure way for Flash to MySQL Database

雨燕双飞 提交于 2020-01-03 05:08:35
问题 Any simple, but secure script available for Flash > MySQL DB integration? I need something for a Login DB. Exchanging variables with PHP is nice and easy, but obviously insecure. via Remoting? I've got the Flash 8 remoting components installed, and some ideas: idea-1, idea-2. via NetConnection? Got some leads: lead-1, lead-2. Cold Fusion? Anybody has any ideas? Less likely solutions: via XML? Anybody has any idea how to use XML to connect to a DB? (AS2 or AS3) AMF-PHP is not possible for