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
49
votes
8 answers

How do I connect to a database and loop over a recordset in C#?

What's the simplest way to connect and query a database for a set of records in C#?
Michael Pryor
  • 25,046
  • 18
  • 72
  • 90
46
votes
4 answers

When to close db connection on android? Every time after your operation finished or after your app exit

I have an android application that access local sqlite3 db frequently, for performance consideration so i always keep the connection open. But one of my friends recommended me to open/close the connection every operation. 1) What's your guys…
jim.huang
  • 1,052
  • 2
  • 9
  • 14
46
votes
4 answers

Getting "I won't open a connection to" when connecting to FTP server from Google Compute Engine

I ssh'ed to my Google Compute Engine's VM. And want to ftp to another server from there. It asked my username and password, I could login without problem. But when I do ls or get, I receive this error: 500 I won't open a connection to 10.240.XX.XX…
Nur Pinar
  • 461
  • 1
  • 4
  • 4
46
votes
6 answers

How to take a backup for the 'connection details' in sqldeveloper?

What is the process to take a backup of all the connection-details (viz. host,port,sid,etc.) in 'oracle sqldeveloper' software. How can we import these connection details to some other machine ?
Satyendra
  • 1,635
  • 3
  • 19
  • 33
44
votes
2 answers

When does Entity Framework open and close Database Connections?

When I instance my "Entities" object in Entity Framework, and make a couple of queries using that Entities object, what happens to connections? Does it open a connection when I instance the object, and close it when I dispose of it? Or does it open…
Daniel Magliola
  • 30,898
  • 61
  • 164
  • 243
43
votes
1 answer

Python psycopg2 timeout

I have a huge problem: There seems to be some hardware problems on the router of the server my python software runs on. The connection to the database only is successfull about every third time. So a psycopg2.connect() can take up to 5 minutes…
gulden
  • 505
  • 1
  • 7
  • 13
42
votes
1 answer

Python requests - Exception Type: ConnectionError - try: except does not work

I am using a webservice to retrieve some data but sometimes the url is not working and my site is not loading. Do you know how I can handle the following exception so there is no problem with the site in case the webservice is not working? Django…
user1431148
  • 727
  • 1
  • 9
  • 21
42
votes
3 answers

Connecting to multiple databases in ruby on rails

I have a ruby on rails application working fine and connected to a database. Now i want to connect to a different database from the same application. The data model can be exactly the same. In fact if i connect to the different database the…
user1428970
  • 451
  • 1
  • 5
  • 4
42
votes
24 answers

Android SDK Manager won't update: connection to https://dl-ssl.google.com refused

This is the same problem as a number of other have reported, e.g. Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: Connection to https://dl-ssl.google.com refused Android SDK Not Updating Packages Android…
user1405990
  • 806
  • 1
  • 8
  • 19
41
votes
6 answers

React native - connection has no connection handler error meaning?

I created a new react project and when I run it on iOS from xcode, the console gives me this: 2017-05-19 23:25:34.119 [info][tid:main][RCTBatchedBridge.m:77] Initializing (parent: ,…
guribe94
  • 1,551
  • 3
  • 15
  • 29
41
votes
4 answers

Android HTTP User Agent

How do I get the real device in http_user_agent? When I use a WebView, I can get the real value like this: [HTTP_USER_AGENT] => Mozilla/5.0(Linux; U; Android 2.2; en-gb; LG-P500 Build/FRF91) AppleWebKit/533.0 (KHTML, like Gecko) Version/4.0 Mobile…
user430926
  • 4,017
  • 13
  • 53
  • 77
39
votes
8 answers

ansible SSH connection fail

I'm trying to run ansible role on multiple servers, but i get an error: fatal: [192.168.0.10]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh.", "unreachable": true} My /etc/ansible/hosts file looks like…
Thomas
  • 741
  • 4
  • 9
  • 20
37
votes
7 answers

Python server "Only one usage of each socket address is normally permitted"

I'm trying to create a very basic server in python that listens in on a port, creates a TCP connection when a client tries to connect, receives data, sends something back, then listens again (and repeats the process indefinitely). This is what I…
scaevity
  • 3,991
  • 13
  • 39
  • 54
36
votes
2 answers

MySQL concepts: session vs connection

I'm a bit confused by MySQL concepts: session vs connection. When talking about connecting to MySQL, we use connection terminology, connection pool, etc. However in the MySQL online doc:…
Xiaofeng Tang
  • 476
  • 1
  • 6
  • 8
36
votes
8 answers

SSH connection with Java

How can I connect to an SSH server in Java? I don't need/want a shell. I just want to connect to the SSH server and get the content of, say, file.txt. How can I do that?
user348041
  • 361
  • 1
  • 3
  • 3