Tag: java

how to enter data in JTextArea by using procedures in java

import java.awt.Font; import java.sql.*; import java.util.*; import javax.swing.*; import java.awt.event.*; public class STAFFnew implements ActionListener { JFrame frame; JPanel panel; JTable dataTable; String Status[]={“Processed”,”Pending”}; JLabel comLabel,staffLabel; JTextField complaintField; JButton detailButton,submitButton; JTextArea descriptionArea,remarksArea; JScrollPane dataScroll,descriptionScroll,remarksScroll; public STAFFnew() { frame=new JFrame(“Staff”); panel=new JPanel(); dataTable=new JTable(100,5); dataScroll=new JScrollPane(dataTable); comLabel=new JLabel(“Enter Complaint No:”); staffLabel=new JLabel(“STAFF PORTAL”); Font font=new Font(“ARIAL […]

Dll missing error from java\jdk\bin folder while executing SSIS package

I have created a simple SSIS package which brings in data from SQL Server and Oracle databases into staging table and dumps it into a SQL Server target table after processing. although all the transformation are getting executed successfully, at the end getting the below error message. DTExec: The package execution returned DTSER_FAILURE (1). Started: […]

Error when trying to make SQL Server database connection in Java code

This question already has an answer here: How can I connect to SQL Server using integrated security with the JDBC driver? 1 answer

SOLR sqlserver unable to execute query

I’m attempting to setup SOLR for the sake of indexing a few large tables and allow faster text searches. When trying to import, I get the error “Unable to execute query” Here is what’s currently in my dataconfig file: <dataConfig> <dataSource driver=”com.microsoft.sqlserver.jdbc.SQLServerDriver” url=”jdbc:sqlserver://localhost;databaseName=tempdb” readOnly=”True” user=”TestSA” password=”testtest”/> <document> <entity name=”testTable” query=”select * from TestTable”> <field column=”id” […]


I see there’s already a post on something similar but the solution there didn’t work for me. I’m trying to use the MATLAB 2017 database app and MSSQL Enterprise so I can import SQL data into MATLAB using SQL syntax. I tried the Mathworks method by creating the two text files. This didn’t work as […]

is it possible to connect mssql by domain user using impersonation not using jtds

We are mostly using MSSQL and connecting the databases either database user or active directory user. We use the jtds library for active directory users. Now we start to use Oracle databases, I think jtds not support Oracle. Before starting Oracle connection, I try to connect MSSQL with integratedSecurity option by impersonating not using jtds. […]

java.sql.SQLException: Native table 'performance_schema'.'session_variables' has the wrong structure

Previously I accidentally dropped ‘performance_schema’ and ‘sys’ from DB. I ran mysql_upgrade -u root -p –force –skip-version-check in order to recreate those two. They were successfully recreated. I couldn’t restart the MySQL service because I couldn’t find MySQL running in Administrative Tools -> Services. So I think some of the database has broken and now […]

Get image from SQLServer to Android using JDBC

I am trying to get an image from sql server and use it in my android application. The code for creating table and storing the image in the database table is : create table Imagee (ID int not null,Img VARBINARY(max) not null) insert into Imagee (ID, Img) SELECT 1, BulkColumn FROM Openrowset( Bulk ‘C:\Razvan\PozeDB\hawai.png’, Single_Blob) […]

How to get *everything* back from a stored procedure using JDBC

I occasionally encounter two forms of strange behaviour when using JDBC to work with SQL Server stored procedures: Issue 1: I run a stored procedure in SQL Server Management Studio (SSMS) and it returns a result set. However, when I try try (CallableStatement cs = conn.prepareCall(“{call dbo.TroublesomeSP}”)) { ResultSet rs = cs.executeQuery(); I get the […]

add java datatype <-> db datatype mappings

I initially generated the entitis from the database. Now there were certain DB datatypes which weren’t understoond by eclispelink, such as: DateTime2 Date They were just interpreted as strings. Since I am using Java 8 I use LocalDate and LocalDateTime on the java side. And I created a converter from java.sql.Timestamp to these to Types. […]

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