This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes How to create and use  a object of sqlmapclient Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to create and use  a object of sqlmapclient" Watch "How to create and use  a object of sqlmapclient" New topic
Author

How to create and use a object of sqlmapclient

Pankaj Kaushik Sharma
Greenhorn

Joined: Oct 31, 2010
Posts: 1
package com.college.beans;

import java.sql.DatabaseMetaData;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;

import javax.activation.DataHandler;

import oracle.net.ns.DataPacket;

import com.college.POJO.registerPOJO;
import com.college.dao.RegisterDAO;
import com.college.dao.RegisterDAOImpl;
import com.college.model.Register;
import com.college.model.RegisterImpl;
import com.ibatis.sqlmap.client.SqlMapClient;
public class registerBean extends registerPOJO{

public registerBean() {
super();
add();

// TODO Auto-generated constructor stub
}
public void add()
{
RegisterDAO dao=new RegisterDAOImpl(null);
Register record;
try {
SqlMapClient sqlMapClient = Util.getSqlMapClient();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

try {

reg.getIndexNo();
reg.getAddress();
reg.getCity();
reg.getCountry();
reg.getDob();
reg.getEmailId();
reg.getName();
reg.getPassword();
reg.getUsername();
reg.getState();
reg.setImagePath(null);
record=reg;
dao.insert(sqlMapClient,record);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();

}


}
}
there is a problem of data insertion in my database...
the line dao.insert(sqlMapClient,record); is not working properly...please anybody suggest me how to use and create a sqlmapclient
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
Please post the full error that you are getting.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to create and use a object of sqlmapclient
 
Similar Threads
OpenYMSG API on android
encrypt data
encrypt data in database
Getting value of static variable with Reflection ?
Is this Dao?