Tag: java

Hibernate SQL In clause making CPU usage to 100%

In my java application I am using SQL server and Hibernate3 with EJB. When I tried to execute a select query with In clause, the DB server CPU usage reaches to 100%. But when I tried to run the same query in SQL management studio, the query is running without any CPU spikes. Application server […]

Connecting NetBeans 8.0.2 to Microsoft SQL Server Management Studio

I am working on an app in NetBeans for a class and need the GUI to be able to communicate to a database that I created in Microsoft SQL Server Management Studio. The GUI need to be able to take user information and import it to the database. It also needs to be able to […]

Cannot connect to Sql Server via Android Test

I have created simple android tests with UiAutomator. In these tests I want to confirm that some data were added in the database. In my pc I can connect to the database, but in the virtual android device I get the following error: java.lang.ClassNotFoundException: Didn’t find class “net.sourceforge.jtds.jdbc.Driver” on path: /system/framework/android.test.runner.jar:/system/framework/uiautomator.jar::/data/local/tmp/Tests.jar when loading the driver: […]

How to save “Finger Print” in database

I need to save finger print type “.ftp” in MSSQL database. How can I do that? What data type should I use in creating MSSQL database? I am using Java application to get the finger print. Please help!

How do I resolve mssql resetting connections

I keep getting this error randomly when I test an application with mssql and don’t have an idea of what I can do to correct the issue. Exception [EclipseLink-4002] (Eclipse Persistence Services – 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset ClientConnectionId:a2fb508d-0e8e-48b0-92ed-2d1f262b4db1 Error Code: 0 My setup consists of Eclipselink as the ORM sqljdbc v4.1 sql […]

sqlserver express connection over servername\instancename

i try to connect to my local sqlserver express 2008 R2. when i specify server name as 127.0.0.1 , like String url = “jdbc:sqlserver://127.0.0.1;databaseName=mydatabase;”; i can connect. but when i write servername\named instance as server name like String url = “jdbc:sqlserver://machinename//instancename;databaseName=mydatabase;”; then i couldnt connect to server. configurations: i set tcp/ip connection enabled. i set […]

SQLServerException: Login failed for user 'sa'

When my web application tries to access the database and tries to connect I get this error com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user ‘sa’. ClientConnectionId:1735d097-3f1b-413e-9d33-6a7ba2fbeb65 Here is my connection string : private static final String DBDriver = “com.microsoft.sqlserver.jdbc.SQLServerDriver”; private static final String DBUrl = “jdbc:sqlserver://localhost;database=Survey;”; private static final String DBUser = “sa”; private static final String […]

Mapping between BIGINT in Sql with BigInteger in Java

We are facing some issue in which when we try to map BigInteger in Java with BigInt in sql, its value got changed. We also try to convert it to longValue before mapping but it also failing as long could not able to handle its value. We tried with toString() and it got worked but […]

Java – connecting to a SQL Server database on Linux

I’ve downloaded and imported into my project this JDBC driver that supposedly supports Linux (albeit tested only on SUSE Linux). What I want is to be able to use a .mdf database through Java on Linux. The queries obviously need something to run on, not simply connect to a database – if I am understanding […]

Changing one datatype to another in all columns of SQL Server in Java

I am using Altova XMLSpy to create database from one GML schema. But, all string type fields are converted as char(255). I need to make it nvarchar(255). Can I do this in Java and how? I think it would be usefull because I need to make more than one DB at this way, so I […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.