connection

Why do I see NotUpdatable when I invoke ResultSet.refreshRow()?

怎甘沉沦 提交于 2019-12-02 02:05:18
When I invoke following rows: Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = statement.executeQuery("select * from user"); resultSet.next(); resultSet.refreshRow();//exception throws here I see following exception: com.mysql.jdbc.NotUpdatable: Result Set not updatable.This result set must come from a statement that was created with a result set type of ResultSet.CONCUR_UPDATABLE, the query must select only one table, can not use functions and must select all primary keys from that table. See the JDBC 2.1 API

Named pipes between Java and C/C++ programs

☆樱花仙子☆ 提交于 2019-12-02 02:03:45
I think of using in windows a named pipe to communicate between two apps written in Java and C. Normally i use socket connection to do this, but now i have to cancel this idea and find a new solution. I read that named pipe in java can be visible only inside JVM-is this true? Is there a way to establish named pipe between two apps wriiten in different language? If not, what kind of technology do You advice? In order to create a Windows named pipe in Java, you'd have to resort to using JNI to call the native WINAPI functions. You can create the named pipe in C++, though, and consume it in Java

db connection pool across processes

假装没事ソ 提交于 2019-12-02 02:02:46
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)? Database connections in OLEDB and ODBC are intrinsically process bound. At the lowest levels, a sql server database connection is using an IPC mechanism like named pipes, shared memory, or tcp sockets. Other databases probably use network

detect if machine is online or offline using WMI and C#

百般思念 提交于 2019-12-02 01:34:42
I use vs2008, winxp, in LAN network with Win2003 servers. I want a application installed in winxp for detect if win2003 machines is online or offline , and if offline when boot it. I have this references, any more references, code samples and best practices ?? http://danielvl.blogspot.com/2004/06/how-to-ping-in-c-using.html http://snipplr.com/view/2157/ping-using-wmi-pingstatus/ http://dotnoted.wordpress.com/2005/01/15/the-popular-c-ping-utitility/ http://www.visualbasicscript.com/Ping-WMI-amp-NonWMI-Versions-Functions-amp-Simple-Connectivity-Monitor-m42535.aspx I would go for the .NET System

Javascript create WebSocket connection refused - content security

白昼怎懂夜的黑 提交于 2019-12-02 01:12:59
问题 Trying to open a WebSocket connection from a Browser to a server running on localhost:9000 here is my JS code: $( document ).ready(function() { var url = "ws://localhost:9000/myapp"; var connection = new WebSocket(url); connection.onopen = function() { console.log('WebSocket Open'); }; connection.onerror = function(error) { console.log('WebSocket Error ', error); }; connection.onmessage = function(event) { console.log('WebSocket Msg ', event); } }); But the browser is refusing to accept the

Are resources used by a Java application freed when it terminates?

与世无争的帅哥 提交于 2019-12-02 01:12:28
Java applications may use IO streams, sockets or database connections that should be closed when they are no longer needed. However, applications may be terminated (e.g. by killing the process). Will all used resources be freed in this case? Who will free them: OS or JRE? haylem If your software doesn't take care of resource management properly, the following will happen: at runtime: the JVM will attempt during the duration of your program to close open streams if they're are seemingly unused (during garbage collection cycles), at your program's termination point: the JVM should close open

Azure hybrid connection Manager does not work

半腔热情 提交于 2019-12-01 23:23:33
Requirement I have an On-Premise SQL Server and an Azure webApp Service that needs to talk each other. I installed Hybrid Connection Manager on another computer which is in the same LAN as the SQL server. Let's refer this computer as the Connection PC . The working part Installation and configuration was straight forward, status of the hybrid connection showing as connected. Tested the WebApp on localhost, it worked fine. Which means nothing wrong with the asp.net code SSMS on the connection PC can access and query SQL DB I installed a test SQL DB on the connection PC itself and use the WebApp

JDBC cannot login to LocalDB instance, but in SSMS I can log in

时间秒杀一切 提交于 2019-12-01 22:55:27
问题 I am trying to connect to my database by JDBC on localhost. Connecting via windows authentication is no problem, but I want to connect via SQL authentication. Therefore, I created a login and a user corresponding to this login in my database. I can normally log in SSMS: My connection string for JDBC: jdbc:sqlserver://localhost:1433;databaseName=TestBazyDanych;user=doszke;password=doszke123 Thrown exception: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'doszke'.

How to change Crystal Reports connection string using OLE DB in vb.net?

◇◆丶佛笑我妖孽 提交于 2019-12-01 22:50:55
i have a "Connection.vb" where all my Connection string stored and used by the entire program. i'm new to Crystal Reports.. and i want to changes its connection string based on the connection string i made... im using MS SQL 2008.. SQL Server Native Client 10.0 OLE DB Provider.. and here is my connection string. "Provider=SQLNCLI10;Server=....\SQLEXPRESS;Database=Blah;Trusted_Connection=yes" i tried to google it.. but they are using different language, different database, and complex examples... thanks in advance.. I just spent some quality time figuring out this exact problem, in VB. I hope

React Native: Simulate offline device in Jest unit test

ぃ、小莉子 提交于 2019-12-01 22:36:53
问题 I'm writing a React Native app and I'm using Jest to unit test my code. I've written a function than checks if there is an internet connection. I know want to write it's unit tests. I'm stuck, because I can't figure out how to mock the connection state of the device in a unit test. How would you simulate that the device is offline or online in a unit test? Edit: Here is the function: import { NetInfo } from "react-native"; import { NO_NETWORK_CONNECTION } from "../../../../config/constants