Home » Archive

Articles tagged with: SQL

Written By: techieDan on December 17, 2009 One Comment
Hibernate Error : exception setting property value

Been playing around with Hibernate and mapping classes with Java. A reason why Hibernate is useful is so to facilitate users to stop writing pure SQL for queries and reduce code redundancy. A slight note, Hibernate also works well with the .NET platform.

Though there was this error which TechieDan experienced

org.springframework.orm.hibernate3.HibernateSystemException: [...]

Written By: techieDan on March 17, 2009 No Comment

a programmer uses PreparedStatement instead of Statement when doing SQL queries in my projects. I found out that I can indelibly hacked into the system when I use SQL injection

Tags: [, ]
Written By: techieDan on January 21, 2009 3 Comments

For those Java like programmers, they will be using pure SQL statements to get the whole of a table by typing the typical SQL query statement.

String SQL = “select * from tablename where condition = ?”;

From then onwards it can be passed to a POJO to be declared but everything has to be done one [...]

Tags: [, , ]
Written By: techieDan on March 15, 2008 No Comment

Coding have never been the same!!! Some bad habits when writing codes which are redundant

String[] special = {“a1″,”a2″,”a3″,”a4″};

Connection con = null;

PreparedStatement stmt = null;

PreparedStatement stmt2 = null;

ResultSet rs = null;

ResultSet rs2 = null;

Class.forName (“com.mysql.jdbc.Driver”)

conn = DriverManager.getConnection (url, userName, password);

String [...]

Tags: [, , ]
Written By: techieDan on February 13, 2008 No Comment

mySQL and msSQL has a similar SQL syntax but not the same. To have a grasp of what does this mean, let’s have an exercise to get 10 rows from a table with mySQL.

select * from [tablename] limit 10

Now if you were to run this sql query above on msSQL server you’ll either get a wrong sql [...]

Tags: [, , ]
  Copyright © 2009 TechieDan, All rights reserved.| Powered by WordPress