SQLserver2008 « SQLserver « Java Database Q&A





1. How to scan/search for active SQL Server instances with Java?    stackoverflow.com

Is there an easy way, using Java, to scan/search the local network for SQL Server database instances?

2. How to capture/encode special character for SQL Server in java app?    stackoverflow.com

I have a java app + SQL server database. DB operation use JDBC with dynamic SQL string. Example: Select Column from tab where column=StringParm StringParam is user input. if the stringParm include apostrophe, ...

3. Is there a way to display PRINT results with SQL server JDBC driver?    stackoverflow.com

If my stored procedure has a print statement inside it:

print 'message'
Is there a way to fetch the output in java program that connects to SQL Server 2008 through JDBC? Also, is there ...

4. WSAD to SQL Server Connectivity Issue    stackoverflow.com

I am facing issues connecting to SQL Server 2008 from WSAD 5.1.2 ( WAS version 1.5.1.1 ). I am using Microsoft SQL Server 2005 JDBC Driver Version 1.2 on JRE ...

5. MS Jdbc driver sqljdbc 2.0 driver fails to connect to SQL Server 2008    stackoverflow.com

We have a well-defined problem that points to a problem with Microsoft's JDBC 2.0 driver for JDK 1.6 ("sqljdbc4.jar"). I may be wrong. I've been wrong before. I wanted to ...

6. Connection between J2me and Sql Server 2008    stackoverflow.com

I want to connect my mobile application(J2me) with SQL Server 2008. Please help me. I'm new in j2me. I need any articles or examples about this connection.

7. How do I connect to a SQL Server 2008 database in Java with JDBC?    stackoverflow.com

I have MSSQL 2008 installed on my local PC, and my Java application needs to connect to a MSSQL database. I am a new to MSSQL and I would like get ...

8. Connecting to SQL Server 2008 from Java    stackoverflow.com

I am trying to connect to SQL Server 2008 server from Java here is a program

import java.sql.*;

public class connectURL {

    public static void main(String[] args) {

   ...

9. Fetch metadata on SQL Server 2008 - extremely slow    stackoverflow.com

We moved from SQL Server 2005 to 2008 earlier this year, and after the upgrade we noticed that fetching the metadata for tables and views along with all of their respective ...





10. IBatis and SQL Server on Java    stackoverflow.com

I'm trying to make a Java connection with SQL Server, but I'm facing some problemas. I believe I not specifying correctly the database name. My SQL Map is something like

  ...

11. SQL Server data type mapping to JDBC data types    stackoverflow.com

I am trying to map all the MS SQL Sever 2008 data types to their corresponding JDBC 4.x data types (using Java.SQL.Types). I was able to get most of them from ...

12. JDBC Drivers for SQL Server 2008    stackoverflow.com

I am trying to connect from a Java app to a SQL Server 2008 database, in Eclipse. So far I have tried using SQL Explorer and the latest JDBC drivers ...

13. sql server 2008 express - unable to connect    stackoverflow.com

I just installed sql server 2008 express on xp in vmware. My connection string looks like this

jdbc:jtds:sqlserver://localhost:1433/DEV
I have enabled TCP/IP I have started Sql Server and Sql Server Browser service I have ...

14. Mathematica 7 and ODBC problems on Windows OS 2008    stackoverflow.com

I'm setting up a replacement server. Mostly it runs Mathematica jobs. I set up the ODBC connections on the new box to be the same as on the old box, but ...

15. No ResultSet when using MS SQL Server 2008 R2 transactions in stored procs?    stackoverflow.com

So we have an app that calls into many stored procs in SQL Server 2008 R2. Most the stored procs are simple CRUD type ones (ie don't need to use transactions) ...

16. JDBC connections from Linux to MS SQL Server 2008 time out after 40 seconds    stackoverflow.com

[See updates at bottom] I'm using JDBC to run statements against SQL Server 2008 R2 on a Windows 2008 R2 machine from a machine running Ubuntu 10.04 LTS with the 2.6.32-32-server kernel. ...





17. using setObject executing dynamic sql via java and jdbc on sql server 2008 sp1    stackoverflow.com

I am having a problem with the setObject syntax, however, I am not seeing any errors, my code just stops. I am executing dynamic sql commands not stored procedures. Do I ...

18. Connecting SQL Server 2008 to Java: Login failed for user error    stackoverflow.com

I am trying to connect my Java code to a Microsoft SQL Server 2008 R2 Express database. I have downloaded the Microsoft SQL Server JDBC Driver 3.0 and added the ...

19. unable to connect to sqlserver database via jdbc    stackoverflow.com

I want to connect my database named aaa via jdbc. I tried using type 1 driver and wrte this quote but the error"[Microsoft][ODBC Driver Manager] Invalid string or buffer length" type 1 ...

20. Could not connect to SQL Server 2008    stackoverflow.com

I have a problem right now. i couldn't able to connect my web to SQL Server 2005. I'm using netbeans. when i try to connect, the exception below occured :

java.lang.UnsupportedOperationException: Java ...

21. How to compare date with a date range    stackoverflow.com

I want to calculate Total of Quantity and GROUP BY CarID but am currently unable to do this. In my database have some tables: TBL_CAR_TX, TBL_CAR, TBL_PERSON

table: TBL_CAR_TX
------------------
select * from ...

22. Cannot load driver: com.microsoft.sqlserver.jdbc.SQLServerDriver weblogic 10g    stackoverflow.com

I'm trrying to create a datasource from weblogic 10.3 to sqlserverexpress 2008 r2, but when i am testing de connection appears the following message: Cannot load driver: com.microsoft.sqlserver.jdbc.SQLServerDriver What can i do

23. How do I get started using JDBC and SQL Server 2008 R2?    stackoverflow.com

I've been googling this for the last 3 hours, and I've had no luck. I'm trying to connect to a SQL Server 2008 with Java, which I normally access with SQL ...

24. Prepared statement with wildcard not returning certain rows but query returns all rows?    stackoverflow.com

I'm using JTDS as a driver to connect to SQL server. Here's the query that's giving me problems:

SELECT EmpID,FirstName,LastName,CompanyName,DepartmentName,JobTitle,HireDate FROM Employees where UPPER(FirstName) LIKE 'KEVIN%'
It returns 2 rows on SQL Server. One ...

25. Problem in Sql server 2008 connection with JDBC    stackoverflow.com

Suggest driver for connecting SQL Server 2008 with jdbc and connection string. Thanks.

26. JDBC command to insert/delete/update multiple records?    stackoverflow.com

suppose I have a table that has the following keys:

1
2
3
and then I get a new request (JSON list) to update that table with:
2
4
The user wants me to delete 1 and 3. ...

27. SQL Server 2008 SYSDATETIME returns wrong date    stackoverflow.com

When I execute a select with SYSDATETIME() it gives me date 2 days in the past!!! 3 of the date functions gives me dates in the past and 3 give me ...

28. DatabaseMetaData.getColumns() giving error with SQL Server 2008    stackoverflow.com

We have a database code in place for a long time which is running successfully with Progress DB. Recently, we tried it with SQL Server 2008 with JDBC 4 driver .It ...

29. Driver.getConnection hangs using SQLServer driver and Java 1.6.0_29    stackoverflow.com

I didn't know where to write something about this and decided to do it here. After loooong time debugging my program I could find out that calling Driver.getConnection(string, string, string) hangs the ...

30. What mechanisms are used by SQL Server 2008 Mirroring to notify a driver that the primary has failed over?    stackoverflow.com

  • I've got a database that is mirrored using SQL 2008 Mirroring.
  • I have a java application, running on Linux, using the Microsoft SQL type 4 JDBC drivers.
  • I have this setup duplicated as a ...

31. Calling a SqlServer SProc containing Option Parameters with Java JDBC    stackoverflow.com

I'm currently having an issue with calling a SQL Server 2008 Stored Procedure using JDBC. The issue appears to be around optional parameters and the order of the parameters in the ...

32. What's the difference between running the application from netbeans and running the jar?    stackoverflow.com

I have a java application that works perfectly when running from Netbeans 7.1 but it crashes if I use the build jar. I've been investigating the problem and I've noticed that the ...

33. SQL Server 2008 and sqljdbc4 JDK1.6 Connectivity    stackoverflow.com

Has anyone successfully used SQL Server 2008 sqljdbc4.jar with JDK 1.6? The symptom is that it hangs on DriverManager.getConnection(url) statement with no exceptions or errors. Any hint would be appreciated. I have ...

34. How is SQL Server's timestamp2 supposed to work in JDBC?    stackoverflow.com

I'm having some trouble trying to use timestamp2 instead of Timestamp in SQL Server 2008. Apparently, rs.getTimestamp has very different behavior between timestamp and timestamp2. However, I can't find ...

35. Netbean Service with Sql Server 2008    stackoverflow.com

I have been trying to connect netbean service for database explorer with Microsoft SQL Server JDBC Driver 3.0 but unsuccessful always.The zipped jdbc driver has two jars I tested it with ...