connection

SSIS with variable excel connection manager

ぃ、小莉子 提交于 2019-12-04 03:24:31
问题 I am trying to do automatic package execution with a WMI Event Watcher Task within SSIS. The functionality I want is automatic package execution when excel files are dropped into a certain folder. However, these excel files will be the connection managers for populating a database. Currently SSIS will not allow me to do this because my excel connection manager does not have a path when I run the program, and only exists once the files are dropped in the folder. Is there a way for variable

Sqlite + c#: Unable to open the database file

北慕城南 提交于 2019-12-04 03:20:46
private void SetConnection() { string a = string.Format(@"Data Source={0};Version=3;New=False;Compress=True;", "~/lodeDb.db"); sql_con = new SQLiteConnection(a); } private void ExecuteQuery(string txtQuery) { SetConnection(); sql_con.Open(); sql_cmd = sql_con.CreateCommand(); sql_cmd.CommandText = txtQuery; sql_cmd.ExecuteNonQuery(); sql_con.Close(); } When i run to sql_cmd.ExecuteNonQuery, Sqlexception is "Unable to open the database file". "lodeDb.db" file on my online hosting, i think data source is wrong. Can U tell me if db file in online hosting. How to set datasourse for connection

Sending information to a ngnix from php on the same server without http

我与影子孤独终老i 提交于 2019-12-04 03:07:22
We are developing a realtime app and we are using nginx push stream module for a websockets part. Firstly, data is send from a client to a php script that does some authentication and stores needed information in database and then pushes information to nginx that later sends it to a subscribed users on a specific sockets. Quite often there will be situations when there are more that 30 http requests made from this script to local nginx ( which I am not exactly sure is a bad thing? ). Question Is it possible to send information from php to nginx without http requests? Is there any way that my

Entity Framework - The underlying provider failed on ConnectionString

只愿长相守 提交于 2019-12-04 03:03:55
问题 While using the Entity Framework I have split it out to it's own project: RivWorks.Model - Contains Entity Model RivWorks.Controller - Uses the Entity Model and contains the biz rules RivWorks.View.Web - The web site RivWorks.View.Services - WCF project Everything in the web site is working fine. I am able to call into the Controller and get a valid Model back. When I try the same thing from the Web.Service I am getting this error: ERROR: The underlying provider failed on ConnectionString.

Not able to connect to MySQL server using PDO [closed]

折月煮酒 提交于 2019-12-04 03:01:58
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have a PHP script which I use to connect to a MySQL database. Connection through mysql_connect works perfectly, but when trying with PDO I get the following error: SQLSTATE[HY000] [2005] Unknown MySQL server host 'hostname' (3) the code I use to connect is below: <?php ini_set('display_errors', 1); error

Alert box when no internet connection - Phonegap

梦想的初衷 提交于 2019-12-04 02:24:24
I'm trying to get a pop-up to, well, pop up when there is no internet connection on the device. I got the following example working, but now I want the alert only to show when the result is "No network connection". I tried this: if (states[Connection.NONE]){ alert('Geen internet :('); }; But that just makes the alert-box pop up, no matter if there is a connection or not. Who can help me? :) edcs Old-ish question, but here's how I'd do it - You can use events to detect if the device is online or offline. This is ideal for this situation as the pop-up will appear as soon as the device goes

Cannot connect from Classic ASP to SQL Server 2008 R2 using SQL Native Client (Windows 7 - IIS7)

泄露秘密 提交于 2019-12-04 01:40:48
I'm able to connect to SQL server 2008 R2 when I use Provider=SQLOLEDB in my connection string. But when I use Provider=SQLNCLI in connection string I'm unable to connect. ADODB.Connection error '800a0e7a' Provider cannot be found. It may not be properly installed. /test.asp, line 7 Code written within test.asp is below <% Set cn = Server.CreateObject("ADODB.Connection") 'Doesn't work cn.Open "Provider=SQLNCLI;Server=remoteServer\SQL2008R2;Database=DB;UID=MyUser;PWD=pa55word;" 'Works Perfectly 'cn.Open "Provider=SQLOLEDB;Server=remoteServer\SQL2008R2;Database=DB;UID=MyUser;PWD=pa55word;" cn

Close urllib2 connection

大兔子大兔子 提交于 2019-12-04 00:50:02
问题 I'm using urllib2 to load files from ftp- and http-servers. Some of the servers support only one connection per IP. The problem is, that urllib2 does not close the connection instantly. Look at the example-program. from urllib2 import urlopen from time import sleep url = 'ftp://user:pass@host/big_file.ext' def load_file(url): f = urlopen(url) loaded = 0 while True: data = f.read(1024) if data == '': break loaded += len(data) f.close() #sleep(1) print('loaded {0}'.format(loaded)) load_file(url

Migrating from MySql: MariaDB server closing client connections unexpectedly

旧城冷巷雨未停 提交于 2019-12-04 00:20:22
We in the process of migrating from MySql to MariaDB due to licensing/commercial usage reasons. We have successfully replaced the MySql connector jar with MariaDB client jar (first change) and are now trying to replace MySql server with MariaDB server without changing the data files. All our applications run perfectly for about 8-12 hours after which we see the following exception: org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Cannot open connection Caused

In What conditions are closing a HTTP connection necessary?

房东的猫 提交于 2019-12-03 21:25:00
In What conditions are closing a HTTP connection necessary? HTTP isn't the type of protocol to have "connections"; it's what they call "stateless", meaning each request is separate from every other request. That's why we have things like session cookies; people had to hack in a way to allow information to be carried over between requests. Now, even though they're separate, HTTP 1.1 allows a client to make multiple requests over the same TCP/IP connection (which, although it's a connection to an HTTP server, is at a whole other level in the TCP/IP stack). The requests will still be separate,