Questions tagged [connection]

Refers to a connection used to transfer data between two endpoints, such as between a client and a web, database, web service or other server.

A connection is a session established between two communications endpoint applications.

10252 questions
28
votes
2 answers

In C#, is there any way to have an in-memory file linked as an in-memory SQLite database with System.Data.SQLite?

What I want to do is something along the lines of the following: using System.Data.SQLite; using System.IO; //My SQLite connection SQLiteConnection myCon; public void ReadAndOpenDB(string filename) { FileStream fstrm = new FileStream(filename,…
Mike Webb
  • 8,855
  • 18
  • 78
  • 111
28
votes
6 answers

The wait operation timed out. ASP

I created an internal website for our company. It run smoothly for several months and then I made a major update due to user suggestion. When I run in live, it run normally. Then suddenly one of my user from japan sending me an "The Wait operation…
Vic
  • 457
  • 1
  • 6
  • 23
28
votes
4 answers

Connect to Exchange mailbox with Python

I need to connect to an Exchange mailbox in a Python script, without using any profile setup on the local machine (including using Outlook). If I use win32com to create a MAPI.Session I could logon (with the Logon() method) with an existing…
Tony Meyer
  • 10,079
  • 6
  • 41
  • 47
28
votes
1 answer

C# Data Connections Best Practice?

Ok, so this is one of those kind of opinionated topics, but based on your knowledge, opinion, and current practice, what is the best way to set the following scenario up? I'm building an extensive data entry application, and by extensive I mean I've…
Josh C.
  • 389
  • 1
  • 5
  • 17
28
votes
7 answers

How to check for database availability

I have the following code to test DB connection, it runs periodically to test for DB availability: private bool CheckDbConn() { SqlConnection conn = null; bool result = true; try { conn = DBConnection.getNewCon(); …
omer schleifer
  • 3,897
  • 5
  • 31
  • 42
28
votes
13 answers

org.apache.http.conn.HttpHostConnectException: Connection to http://localhost refused in android

I am making an application that uploads images to server and updates its database to server in android while executing it, it shows an error Connection to http://localhost refused and many more errors, I researched this problem and found instead…
ugene
  • 551
  • 1
  • 7
  • 19
28
votes
3 answers

Check if socket is connected or not

I have an application which needs to send some data to a server at some time. The easy way would be to close the connection and then open it again when I want to send something. But I want to keep the connection open so when I want to send data, I…
opc0de
  • 11,557
  • 14
  • 94
  • 187
27
votes
4 answers

How to connect to mssql using pdo through PHP and Linux?

I'm trying to for a new PDO connection using the following code. new PDO("mssql:driver=????;Server={$serverName};Database={$databaseName}", $username, $password, array(PDO::ATTR_PERSISTENT => false, PDO::ATTR_ERRMODE =>…
richie
  • 781
  • 2
  • 11
  • 24
27
votes
12 answers

Database (database/database.sqlite) does not exist. Database works from artisan tinker

I created my database.sqlite file in the database folder. My .env file contents are : DB_CONNECTION=sqlite DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=absolute\path\to\database\database.sqlite DB_USERNAME=admin DB_PASSWORD= When I run php artisan…
Alexandru Antochi
  • 1,295
  • 3
  • 18
  • 42
27
votes
9 answers

What port is used by Java RMI connection?

May I know what port is used by Java RMI connection? If I want to connect a Java client application to a Java server application using RMI connection, what port I need to open at the server machine so that the client application can connect to it? I…
kwc
  • 317
  • 1
  • 5
  • 7
27
votes
9 answers

Best way to manage database connection for a Java servlet

What is the best way to manage a database connection in a Java servlet? Currently, I simply open a connection in the init() function, and then close it in destroy(). However, I am concerned that "permanently" holding onto a database connection…
TM.
  • 108,298
  • 33
  • 122
  • 127
27
votes
6 answers

How to keep a XMPP connection stable on Android with (a)smack?

I use asmack-android-7-beem library for Android. I have a background service running, such as my app stays alive. But sooner or later XMPP connection dies without any notice. The server says that the client is still online but no packets are sent or…
Max
  • 271
  • 1
  • 3
  • 3
25
votes
3 answers

Connect to MySQL database on vagrant machine in PhpStorm

I can not create a connection to a MySQL database in a vagrant machine with PhpStorm. My settings are: DATABASE tab: - Host: 127.0.0.1 - Port: 3306 - User: root - Password: root_passsword SSH/SSL tab: - Proxy host: 192.168.56.102 - Port: 22 -…
gnardell
  • 321
  • 2
  • 4
  • 8
25
votes
2 answers

Connection Timeout and Connection Lifetime

What is the advantage and disadvantage of connection timeout=0? And what is the use of Connection Lifetime=0? e.g (Database=TestDB; port=3306; Uid=usernameID; Pwd=myPassword; Server=192.168.10.1; Pooling=false; Connection Lifetime=0; …
Mark
  • 421
  • 5
  • 11
  • 16
25
votes
1 answer

Mysql Workbench connection ssl not enable

I'm trying to connect local database using mysql workbench but i can't connect.i tried test connection.it warned pop up window write "ssl not enable". how can i connect my local database this is screen shot
sedatbzdgn
  • 251
  • 1
  • 3
  • 5