Let us assume we have a table called “ITEM” and it has four fields named “ order_no”, “item_no”, “qty” and “style_sample_no” . In the field “style_sample_no” there is no data i.e. this filed is blank/null or empty.
Love to share Wordpress, HTML, CSS , JQuery related issues & My observations on Astrology
Let us assume we have a table called “ITEM” and it has four fields named “ order_no”, “item_no”, “qty” and “style_sample_no” . In the field “style_sample_no” there is no data i.e. this filed is blank/null or empty.
For the reporting purpose sometimes we may need to convert xml file into jasper.
Here I have tried to show you the conversion procedure of xml file to jasper file using Java Programming Language.
To do this you need the following jar (drivers actually) files
1. jasper-compiler.jar
2. jasper-runtime.jar
3. jasper_bundle.jar
Below, I have attached the Java Source Code of XML to JASPER Converter, Code to compile and run the source code. Also I have included an Image to show you the whole procedure.
Have you ever faced this exception while executing sql query in your software or database?? Well, I am using Java programming language in the front end and PostGreSQL in the backend i.e. server side. Recently I have faced the following exception which was showing actually from the database. I searched internet for the solution but didn’t get any reliable solution. But at last I have solved it and sharing the solution procedure with you. Hope it will also work with your problem
Here is the problem (Exception)
Batch entry 0 insert into endproduct_mat_req(item_no,end_product_mat_no,mat_no,qty) values(523,71,44,100000.0) was aborted. Call getNextException to see the cause
After a long time I am sharing a post related to Java Programming language. Recently, I have faced a problem while coding on java HashMap key value set on my job. In my last post I have shown How to show Java HashMap Key value pair and work on it. But the problem I have faced is to convert the Key value set to Vector or String. I used two (2) integer type data, separated with colon, as the key value of my HashMap. What I need to convert that colon separated key values to individual integer and then convert them or stored them on Vector.
The program given below will show you how to solve such situation.
Sometimes while working with software using java programming language we may face problem while working with JTable. In JTable Cell you may need to show JButton for various purposes. So, to show JButton in JTable Cell or to fill up JTable’s Column with JButton you will need to use ButtonRenderer and ButtonEditor and to add Click Event on the JButton in JTable cell you will need to add ActionListener for that JButton.
Just Copy the code Below and run it and change it according to your need.
While designing or preparing software you may face problem to check JTable cell is empty or not while entering JTable data in Database. Another thing may happen, suppose you are trying to validate your JTable cell empty or not but it is taking space or null entry as a string and your empty cell validation may not work. Here I am sharing you a little but useful technique by which you will be able to check your empty JTable cell and also if you enter space in the JTable cell it will catch this cell as empty and will show error. Just run the given program and check how it works.
Today I am sharing with you another important topic where I will give you an example by which you will get a clear idea about how to read or search any Bengali or Bangla font from a text pad (notepad) or file and then show it in JTextField. This code is important for those who are trying to prepare English to Bengali Dictionary. Download the reader.txt which I have used here to read Bengali (Bangla) words.
Sometimes we may need to use the value of a vector mainly the integer or numeric value in SQL to execute a query . Suppose you have a vector named studentAge which contains two numeric value for example: [10,12]. Now, if you want to use these two vectors in the SQL to for query execution then you have to write the query as given below.
String sql=”select student_name from student where student_age in (” + studentAge .toString().substring(1, studentAge.toString().lastIndexOf(“]”))+”) and student_class =”+student-class;
Just You have to use the following line
(” + studentAge.toString().substring(1, studentAge.toString().lastIndexOf(“]”))+”)
Sometimes in java while we do coding and use HashMap we may need to check or see the values reside in Key and their corresponding Data or Values at the same time. Here I am sharing you another simple but useful technique to see the key value pair data of HashMap at a time. Just copy the code below and run it on your computer.
Continue reading “Java HashMap Key Value Pair: How to show the Key Value pair data of HashMap.”
Today I am sharing you another basic but important technique about string manipulation. While coding in java, sometimes we need to split or break a string into individual word according to space, commas, colon or any other character between them and then save that individual words into an array of string.
The coding is simple and you can test it according to your need. Just copy the code below and run it in your own machine. Please give comments if this solution is helpful for you.