Click here to Skip to main content
15,892,809 members
Everything / JDBC

JDBC

JDBC

Great Reads

by Bert O Neill
Query Hadoop using Microsoft oriented technologies (C#, SSIS, SQL Server, Excel etc.)
by Bogdan Marian
Ensure your Docker Compose services start in the correct order
by anshulskywalker
Understanding of Example Based Machine Translation (EBMT) system and how to create your own using exisiting tools
by V.
How to dynamically build a JQPlot graph through the code behind.

Latest Articles

by Bogdan Marian
Ensure your Docker Compose services start in the correct order
by Łukasz Bownik
A fluent JDBC wrapper written in 200 lines of code
by James A. Brannan
In this tutorial, we secure a simple Rest API. We begin with a simple example, progress to using a custom UserDetailsService, and finish by adding method level security.
by Han Bo Sun
In this tutorial, I will introduce the use of Spring JdbcTemplate in a Spring Boot web application. This tutorial will show how to create the necessary configuration for JdbcTemplate. And how it can be used for data insertion and retrieval.

All Articles

Sort by Title

JDBC 

5 May 2015 by Jitendra_Jain04
IBM WebSphere Application Server V8.5 Liberty profile is a flexible and dynamic server profile of WAS which enables the WAS server to deploy only required custom features instead of deploying a big set of available JEE components.
6 Apr 2009 by arnavguddu
This article demostrates how to access MS Access databases from Java.
9 Feb 2011 by hamityildirim
AddIn - AddOn programming and An Example for Outlook AddIn Regions, Views, Rules and Reports
2 Jul 2012 by dsagner
Hello to all, Since I am very new to the community, I hope you will excuse my automatic question writing (can't seem to find an adequate answer). I am learning about JDBC, and ran against a wall in start. I managed to set up an example DB, called Lesson22, and added a table Employee with 3...
2 Jul 2012 by DARSHAN MODANI
I havent given a shot but I think this is what the problem might be. You havnt specified Username and Password in connection string.So the connection string would be something like this:"jdbc:derby://localhost:1527/Lesson22;user=me;password=mine";
21 Dec 2012 by Mostafa Elsadany
hi everyone how i can use JDBC with android to connect to MS Sql server thanks for any help
22 Dec 2012 by TorstenH.
That's easy:http://appinventor.blogspot.de/2011/07/android-mysql.html[^]Pretty much a common MySQL-Connection. Please search for some MySQL Tutorials when you get stuck there - that stuff is well documented throughout the web.
30 Dec 2017 by Rain Alex
I have a problem and I'm not to sure about how to go about handling it. I have a group a students in a school management database that I need to randomly assign to pre-defined groups. I've done a lot of research on group assignment but I can't quite find what I'm looking for. Basically, a...
24 May 2010 by komissar2007
hi i work with jdbc on javaand i use mysql,my question is: how can i create backup of my database?
24 May 2010 by PSK_
This might help.http://www.codeweblog.com/backup-and-restore-mysql-database-using-java/[^]
29 Mar 2016 by Giancarlo Rhodes
ORM objects and basic CRUD operation procedures are first phase tasks that come after establishing a first version of the database. This java-based code generation tool builds those classes and stored procedures.
22 Jan 2010 by jazy_smith
Hi all, I have the store procedure as described below with four input fields and few output fields. I want to call this procedure from the method : dueDate(Request reqObj) { ... } I want to log the data that is there in reqObj. the input filed described in stored procedure are defined in the...
24 Jan 2010 by Md. Marufuzzaman
Well nice question.... You need to use SqlParameter[] for executing this type of storedprocedure. The question is how this could be done... See the following code snippets..(i) Input / Calling the StoredProcedure:for (iCount = 0; iCount (ii) Executing the StoredProcedure:public...
1 Jan 2018 by daulmalikm
i want to work on a project based on image encryption application where i wish to use chaotic image encryption algorithm. does it will supprt all types of image formats? What I have tried: Basic guide and tutorial about encryption technique.
1 Jan 2018 by RDBurmon
yes it does, but it depends on which image library you use in Java, first of all lets learn about this algoritham Proposed an effective chaotic encryption scheme based on confusion and diffusion principles. • Introduced bitwise circular rotation operation to increase plaintext sensitivity. ...
29 Jun 2019 by shreeram09
I have created spring mvc project in which I am using JdbcTemplate mechanism to carryout database operations. I am running a scheduler which 1. parses XML file with 300K records 2. validates each field and stores in a model object 3. after preparing object, search in database with select query...
3 Aug 2011 by DeepthiTanguturi
I am changing the value of max_allowed_packet value in my-medium.ini.But it cant updated.How can I solve this problem.
7 Aug 2011 by Kim Togo
My guess is that you are using MySql, correct?my-medium.ini is ONLY a template on how to build up a active configuration.The active configuration is typical my.ini.And and change the value in my.ini file and restart the MySql to activate changes.
11 May 2018 by Member 13814158
Hi guys, I get this error when I want to connect to my database. Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. I use MySQL Workbench Eclipse and Apache. My code is ...
11 May 2018 by ThilinaMD
try this (assuming you have default port number for mysql). Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection ("jdbc:mysql://localhost:3306/dblabor","root","root"); System.out.println("Connection successful");
8 Oct 2012 by Umar2
Hey all, All i would like is assistance to connecting to a database with the .odb file extension//Put this at the beginning of your program private static final String DATABASE_FILE_NAME = "OfMiceAndMen.mdb"; // this is the usual dbcon system.private static final String DRIVER =...
8 Oct 2012 by Thomas Daniels
Hi,Have a look here:http://digiassn.blogspot.be/2006/07/java-creating-jdbc-connection-to.html[^]
9 Apr 2020 by Member 12858897
Can someone help in resolving one of following commented lines please? I tried with LIKE as well as CONTAINS. Got no result with like but the values are there. Also, CONTAINS doesn't seem to work in mySQL LIte. CREATE TABLE...
9 Apr 2020 by Wendelius
One reason for not returning any data could be if the column is case sensitive. You can try the following SELECT pxp.invoice, p2.bookingRef FROM pxp, PolarCruiseBrandPaxFile2 p2 WHERE pxp.invoice COLLATE UTF8_GENERAL_CI LIKE '%' +...
20 Mar 2023 by Bogdan Marian
Ensure your Docker Compose services start in the correct order
18 Mar 2009 by Ritesh Poojara
SQL function to convert GMT datetime to Local datetime
21 Oct 2022 by Joydeep Banerjee 2022
Create a database for a Student Result system consisting of the following two tables: Student (SID, name, ContactAddress) Results (SubjectID, SID, Marks) Develop and deploy a web based “Result Display System” using JSP, any database backend and...
21 Oct 2022 by Richard MacCutchan
Sorry, this site does not provide code to order. If you are unable even to start your assignment then you should review your course notes and/or talk to your teacher.
26 Nov 2013 by SanketAB
Hi All,I am working on a web application which runs on Netscape Application server 4.0. It is built on java 1.1.7. We have Oracle 9i database at back-end.Recently we migrated our application from HP-UX system to Sun Solaris.Now-a-days, we face application stall\halt\not working issue...
27 May 2012 by Harish PR
I am trying to do a mini Project.in my project i had to store the PDF,document,images in database and that i had display on a jsp page, and those file must able to download.can anyone say me how to store those files in Microsoft sql server. and how to connect the MIcrosoft SQL server...
27 May 2012 by Abhinav S
You can do this by using a binary field.Here[^] is a link that could help you.This link[^] provides another tutorial as well.A similar question[^] was asked some time ago.
27 May 2012 by Prasad_Kulkarni
Please refer some links:Storing and Retrieving doc/pdf/xls files in SQL Server[^]SQl Server 2005 : Storing pdf,txt doc files in Tables [^]Store and Retrieve pdf/txt/doc/Images in Sql server database[^]CP Articl: SQL Server - BLOB Import and Export[^]Similar discussions:Save and...
27 May 2012 by Prosan
how to save pdf ,images ,doc files in sql server.i think this articale will help you
10 Aug 2010 by anshulskywalker
Understanding of Example Based Machine Translation (EBMT) system and how to create your own using exisiting tools
27 Oct 2023 by Richard Deeming
Quote: Adding ORDER BY clause gives the similar order and data every time but I do not need that for the requirement. Except you do need that. If you don't specify an explicit order for the results, then the order is undefined. The DBMS is...
27 Oct 2023 by Kanchana Gallage
I am doing implementation for this type of SELECT query in a Spring boot application using named parameter jdbc template. Database used is postgres. SELECT lp.*, gp.NAME, gp.description, FROM global_products gp...
12 Feb 2013 by V.
How to dynamically build a JQPlot graph through the code behind.
18 Jan 2014 by Sameer Mohanty
The code I have written gives me the output of only a single data in the drop down list. I want my drop down list to retrieve and hold all the data of the fname and userid column of the table. I am using struts concept and JSP. Kindly help as to how I should modify my code? public String...
20 Sep 2014 by JayantaChatterjee
Hi,I am trying to create a Database connection with MSAccess Database in JAVA. I am using JDK 8 & MSAccess 2010(.accdb).this code worked on JDK7 but the error occurred after I upgrade the JDK8.when i run my code its gives an error No suitable driver found for...
5 Jan 2013 by Chiranthaka Sampath
When I am trying to insert data into a mysql database table I got the following error "Syntax error in your mysql statement near Values(". I don't know how to fix this matter. The source code is stated at the below. If you could please solve my problem!Thank You. private void...
5 Jan 2013 by AmitGajjar
Hi,Incorrect spell Quote:VALAUESit should be values.best luck
5 Jan 2013 by Chiranthaka Sampath
The Correct MySQL statement is at below.sql = "INSERT INTO ITEMDETAILS(" + "ItemCode," + "ItemType," + "ItemSize," + "ItemName," + "ItemColour," + "InStock," +"ItemPrice)" + "VALUES(" + txtICode.getText() + ",'" + txtIType.getText() + "','" + txtISize.getText() + "','" +...
16 Jul 2011 by uspatel
You can develop any management information System.UI,JDBC and Reporting is the most important part of any MIS.
16 Jul 2011 by thatraja
Here you go, look at those answers(Some answers contains links to external sites).Project topic for mca[^]
15 Jul 2011 by Chief894
Hello guys, I am a software engineering student in APIIT Malaysia and in less than two months I am expected to submit the final year project proposal. But I do not have any idea of what to do as my final year project. I am interested much in front-end graphical user interface design,...
15 Jul 2011 by OriginalGriff
Talk to your tutors: they will have a better idea of how complex a project you are expected to produce. They may not give you any concrete suggestions, but they may be able to help you focus your mind on your strengths, and what is acceptable as a final year project.
16 Jul 2011 by RaviRanjanKr
Go there-[Project List based on Java][^] for getting 41 topics which will might help you.
18 Jan 2015 by mrcellux
FluentJdbc Query API for more convenient native SQL querying
17 Nov 2022 by Marc Brolly
I'm trying to get the primary auto incremented key from one table and store this in another using MySQL connector and JDBC. Although its giving me this error - 'statement.executeupdate() cannot issue statements that produce result sets.' I...
17 Nov 2022 by Richard Deeming
Quote: insertQueryGetId("SELECT workoutID FROM workout") ... workoutID = statement.executeUpdate(query, Statement.RETURN_GENERATED_KEYS); You're passing a SELECT query to the executeUpdate method. The error clearly tells you that this is not...
20 Apr 2019 by dhruv1707
Hello i have big data in my oracle 10g database and have to perform some calculations on every row of resultset. So i call a separate calculation class after fetching value of single row in the while(rs.next) loop. But this actually gives me multiple java.sql.SQLException: Closed Connection...
26 Sep 2011 by Marc A. Brown
You're closing the connection in pipe_calculations.pipe_parameters_costing(). Given that you're sharing a single connection between all classes (the connection in ConnectionManager is declared static), you're closing it for all objects.
27 Jan 2014 by Ted Neward
Google Cloud Platform - Part 5: Google Cloud SQL
29 Dec 2015 by Bert O Neill
Query Hadoop using Microsoft oriented technologies (C#, SSIS, SQL Server, Excel etc.)
18 Dec 2014 by User 10060665
How can I get the total row count of the table. I'm trying methods of ResultSetMetaData, but it only have getColumnCount(). Is there any other way of getting total count of rows.I'm trying following code, public void...
18 Dec 2014 by DamithSL
check below similar questions and the answers:How do I get the size of a java.sql.ResultSet?[^]How to get row count using ResultSet in Java?[^]
18 Dec 2014 by PIEBALDconsult
mysql_insert_id()http://dev.mysql.com/doc/refman/5.7/en/mysql-insert-id.html[^]
18 Dec 2014 by Peter Leow
Refer:last inserted id mysql[^]
1 Jun 2014 by Cesar Bretana Gonzalez
Hello, please, if anybody here knows how to install the 64 bits version of odbc, or where to found it, I need your help, I'm working in a project in Java, using Netbeans 7.3, and I need to link my project with a Microsoft Access 2013 Database (*.accdb), I just found the solution to this problem,...
22 May 2014 by Maciej Los
Not sure what exact problem do you have...Have a look here: ODBC Data Source Administrator[^] The Microsoft® ODBC Data Source Administrator manages database drivers and data sources. This application is located in the Windows Control Panel under Administrative Tools. Beginning in Windows...
6 Jun 2014 by Cesar Bretana Gonzalez
thanks, i have already solve the problem, anyway thanks for the time...
13 Nov 2022 by Member 15489491
I am passing a Set in my query but the data is being passed like this : ('[john,ray,mike]') but I want to pass the data like this in the query: ('john','ray','mike') How Can I do that? What I have tried: This is what I have tried: ...
30 Jan 2014 by reshma786
Hii am trying Connect Java Application with Sql server database 2008(JDBC)1) I created data base in sql servercreate table Emp(Emp_id int not null primary key,Emp_Name nvarchar(50),Emp_Address nvarchar(50))insert into Emp values(001,'xyz','BBSR')insert into Emp...
30 Jan 2014 by thatraja
You're lucky, I got this link which explains the issues clearly with screenshotsConnecting JSP with SQL Server 2008 R2 Express (JDBC)[^]
8 Sep 2014 by erw_nda
The link above was dead, the new one is [IT] Connecting JSP with SQL Server 2008 R2 Express (JDBC).
26 Apr 2016 by Member 12486155
I am having problems inserting data into a postgres table created using java. The created table part of the code works fine, its only when I am inserting values into the table that nothing happens. The code I am using to populate the table tt is:What I have tried:private void...
26 Apr 2016 by Member 12486155
resolved just i have to add c.commit() after pst.executeUpdate();
21 Nov 2022 by Marc Brolly
Each time I click on the JCombobox's arrow to show the list of exercises, it will continue to populate the combo box with duplicates entries shown in the image, made code is also inserted. I know its to know with the re-clicking of the arrow due...
21 Nov 2022 by Marc Brolly
Question was resolved by adding exerciseList.removeAllItems(); before the for loop public void popupMenuWillBecomeVisible(PopupMenuEvent e) { ArrayList nameList = new ArrayList(getComboValues()); ...
14 Jul 2021 by getrelax
I want to connect and access to HSQL DB from C#. I am trying to use JNI to invoke Java code in C# environment. The challenge is how to write java import statement in C# environment. What I have tried: I used the reference shown in this link...
30 Jul 2013 by rahul_dhote
i m using java & jdbc & i want to call a method which is calling procedure from database in a main method
30 Jul 2013 by Shubhashish_Mandal
Check this ..http://docs.oracle.com/javase/1.4.2/docs/guide/jdbc/getstart/callablestatement.html[^]
10 Oct 2014 by Member 10843807
An example to illustrate how esProc Helps Process Structured Text in Java–Conditional Filtering
2 Dec 2016 by Member 12882201
I am using windows 10 64 and has ms access 2016 and jdk 8. How do I connect my java code with database of ms accessWhat I have tried:I tried using jdbc odbc driver, but I came to know that it is no longer used and removed from jdk.
1 Dec 2016 by Richard MacCutchan
See jdbc msaccess - Google Search[^].
2 Dec 2016 by ridoy
You can go with UCanAccess[^]Detail solution: eclipse - Manipulating an Access database from Java without ODBC - Stack Overflow[^]
24 Apr 2016 by Raj Negi
I am new to SOAPUI. On internet i found, this can be done with two ways: Either i can use SoapUI JDBC wizard or Using groovy script. First i tried to create connection using Wizard but i am getting this error :com.eviware.soapui.support.SoapUIException: Failed to init connection for driver...
24 Oct 2012 by FoxRoot
Hello everyone, I developed a java application but I need a database. So, I created table. ı couldn't use MySql so after my researches I decided to use 'JDBC'(which is under the part of Services at Netbeans). I have an ER diagram and a screenshot which represents the tables that I draw on...
8 Aug 2013 by rahul_dhote
I am using JSP, Java, HTML, JDBC, Oracle how to create master form in jsp plz give me suggestions or reference linksrahul dhote
8 Aug 2013 by ridoy
You should find these interesting..How-to-create-master-page-in-javajsp.html[^]http://www.comp.dit.ie/btierney/oracle11gdoc/appdev.111/b28765/mastdetail.htm[^]
11 Nov 2012 by jhakas42
i am trying to Exceute this code:import java.sql.DatabaseMetaData;import java.sql.Connection;import java.sql.DriverManager; import java.sql.SQLException;public class ConnectionDemo{ public static void main(String args[])throws ClassNotFoundException,...
21 Sep 2012 by leejoyprakash
I am importing huge amount of data from CSV files into MSSQL Server 2008. I am using core JDBC (Without any ORM frameworks) and communicating with the DB using the driver 'sqljdbc4.jar' provided by Microsoft.As of now am importing the records one by one. Which takes considerable amount of...
21 Sep 2012 by Mehdi Gholam
If you are using SQL Server try using Bulk Insert...
14 May 2016 by Member 12524018
I am calculating the price of a ticket with discount on weekdays and weekends based on the time duration.So, i gave inputs of duration and date using datepicker plugin which is in Above Page. For this i am getting proper result.But i have to create two different jsp pages(date.jsp and cal.jsp)....
14 May 2016 by Sergey Alexandrovich Kryukov
Probably you can received detailed answers based on session and specific to JSP.I want to suggest more universal and modern alternative based on Web storage. This approach is agnostic to the server side; it can even work without any server side at all, when you simply want to restore some UI...
24 Jul 2014 by Jaswanth Reddy
How to perform an CRUD operations of employee details in a text file from stored procedure using oracle db by java programming....Please provide an solution.....Thanks a Ton in Advance......
8 Feb 2012 by kirrri
connection to the database sql2005
8 Feb 2012 by RDBurmon
Gr8 site for youhttp://www.connectionstrings.com/[^]Hope this helps if yes the accept and vote the answer otherwise revert back with your queries--Rahul D.
8 Feb 2012 by riteshsingh_jsr
This is the command to connect Sql Server 2005:Data Source=.;Initial Catalog=master;Integrated Security=true
8 Mar 2017 by Member 13047430
create or replace procedure updateStudentResult(id int,m1 in int,m2 in int,m3 in int,tot out int,avg out float,grade out char)asbeginselect marks1,marks2,marks3 into m1,m2,m3 from students where...
8 Mar 2017 by RAMASWAMY EKAMBARAM
(1)Modify last param in procedure declaration to avoid ambiguity:create or replace procedure updateStudentResult(id int,m1 in int,m2 in int,m3 in int,tot out int,avg out float,grd out char) -- grade renamed as grdand replace every occurrence of 'grade := ' to 'grd :=...
30 Mar 2014 by gayan_priyankara
i Retrieve data from database and display it in tables in a jsp but i do not have an idea to how to display it on text feildseg-1. when i search a index number.2. the result (name , address, age) must come to the textfeilds which are in my jspif any one can give me a little sample...
30 Mar 2014 by Xiao Ling
You can read JSP Starter Sample for Database Access[^]
31 Mar 2014 by RaviRanjanKr
Try Accessing Databases from Servlets and JSP Pages[^]
6 Jun 2016 by Member 12569519
how to retrieve data from database and display it in table with edit,delete option? using (jdbc servlet html css)What I have tried:using jdbc and servlet I can fetch the data but unable to form it in table and add edit,delete option.
6 Jun 2016 by George Jonsson
You could try to use AngularJS. Here is one starting point out of many:AngularJS Tutorial[^]And this one Angular JavaScript Framework: Interacting with Java Servlet Backend[^]
2 Jun 2018 by Member 13856100
hi. i want to create login page that only user who had role as admin can login. here is my databases : tb_users : user_id (PK, string) password tb_user_auth : user_id (FK,string) objects_id // contain user's role(string) the problem is it seems like i retrieve nothing from objects_id so...
2 Jun 2018 by OriginalGriff
The obvious answer is: the userid and password do not match, so nothing is returned. Use the debugger, to single step through your code and check exactly what is happening, and what is in the various variables. But please, don't do that: Never store passwords in clear text - it is a major...
13 Aug 2012 by FoxRoot
Hello everyone,I have a table "COURSES" in my JDBC database. I am adding some information via button.I created another button to view what "COURSES" include ? Could anybody show me some way ?I have created a form and put a table and a button inside it.