connection

Changing pivot table external data source path with Excel macro

耗尽温柔 提交于 2019-12-20 07:32:09
问题 I'm working on a project in MS Excel where I have several Pivot Tables that read data from a tab-delimited text file with column names in the first row (in the same directory as the Excel file) using the Microsoft Text Driver. I've run into a problem where when I copy the text and Excel files to a new directory and try to refresh the data it says it can't find the text files. Unfortunately there seems to be no way to tell Excel I want the paths to the text files to be relative, not absolute.

How to Connect with MySQL Database File( .sql ) using Directory Path Like MS Access?

一个人想着一个人 提交于 2019-12-20 06:59:13
问题 Sorry Maybe this is the second time I am Asking this question because of not getting any answers . this is my Code try{ File f = new File("Database.sql"); if(f.exists()){ Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection con = DriverManager.getConnection("jdbc:mysql://localhost/"+f.getName(),"",""); }else{ f.createNewFile(); System.out.println("file created"); //also do the connection } }catch(Exception ex){ System.out.println(ex.getMessage()); } and Here is the error :

fsockopen 10053 error when writing Chars to Java socket

一个人想着一个人 提交于 2019-12-20 06:29:57
问题 Right, I'm trying to write a wee script in PHP that will send an in game chat package to Minecraft. //Deliberately low timeout $mc = fsockopen("localhost", 25565, $errno, $err, 3); Now, if that connects successfully, then I send 2 "packets". A single byte with the integer 3 in it to tell Minecraft that it should handle the incoming network traffic as a Packet3Chat "packet": fwrite( $mc, strrev( pack( "C", 3 ) ) ); This appears to work A-OK**. The second "packet" that is required is the length

PHP and HTML: socket_connect() [function.socket-connect]: unable to connect

三世轮回 提交于 2019-12-20 06:28:16
问题 I am working on a php file that connects to my game server and executes a command. The users enter their username on a HTML form that sends them and the username to a php file that connects to the server. The port is forwarded and the server is ready to receive the info, but I keep getting this error: Warning: socket_connect() [function.socket-connect]: unable to connect [110]: Connection timed out in /home/moocraft/public_html/test/vote.php on line 8 error: could not connect to host Here is

How to monitor connection pooling for .NET MySQL Data Connector in IIS

纵然是瞬间 提交于 2019-12-20 06:05:35
问题 I have googled a fair bit on this, but not been able to find an exact answer. We are seeing the following errors in our logs: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Stack Trace: at MySql.Data.MySqlClient.MySqlPool.GetConnection() at MySql.Data.MySqlClient.MySqlConnection.Open() I can monitor client connections on the MySQL server (and they appear

How to insert an array in a loop to the database

天大地大妈咪最大 提交于 2019-12-20 04:54:17
问题 I want to insert a set of arrays into a database(HANA) in a loop.My code is below: public class jdemo { public static void main(String[] args) { Connection connection = null; try { connection = DriverManager.getConnection( "jdbc:sap://myhdb:30715/?autocommit=false",myname,mysecret); } catch (SQLException e) { System.err.println("Connection Failed. User/Passwd Error?"); return; } if (connection != null) { try { int [] array=new int []{1,2,3}; Array array1= connection.createArrayof("Integer"

Hibernate check connection to database in Thread ( every time period )

我怕爱的太早我们不能终老 提交于 2019-12-20 03:07:04
问题 What is best/good/optimal way to monitor connection to database. Im writing swing application. What I want it to do is to check connection with database every time period. I've tried something like this. org.hibernate.Session session = null; try { System.out.println("Check seesion!"); session = HibernateUtil.getSessionFactory().openSession(); } catch (HibernateException ex) { } finally { session.close(); } But that dosn't work. Second question which is comming to my mind is how this session

db connection pool across processes

耗尽温柔 提交于 2019-12-20 03:01:31
问题 We have a client/server application that consists of multiple EXEs. The data access layer is on the same physical tier as the client in a library shared by our EXE modules. ODBC and OleDB connection pools are managed per-process; are there techniques for sharing DB connections across processes (other than moving the data access layer to a middle tier)? 回答1: Database connections in OLEDB and ODBC are intrinsically process bound. At the lowest levels, a sql server database connection is using

MS SQL SERVER, PHP, PDO, ODBC: Login failed for user

*爱你&永不变心* 提交于 2019-12-20 02:53:05
问题 I'm trying to connect using a string: odbc:Driver={SQL Server Native Client 11.0};Server=(localdb)\v11.0;Database=test;uid=sa;password=123321; Result: SQLSTATE[28000] SQLDriverConnect: 18456 [Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'sa'. When I try to connect using Windows ODBC Data Source Administrator the connection is successful. What the problem might be in? 回答1: The network user ' sa ' does not have permission to the Microsoft SQL Server. The best way

How to avoid a NodeJS ECONNRESET error?

て烟熏妆下的殇ゞ 提交于 2019-12-20 02:29:37
问题 I have an app running which is doing every 20 to 30 minutes a http.request. When I do these requests every 10 seconds or so, it works just fine, but when there is a gap of 30 minutes between the requests, I get the following error message. { [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' } Now I think, this is a timeout error. The connection dies in the background and when the next request take place, it throws this error since the connection is dead. My