请教一个datasetdata和dataset的问题

03-04-12 lmredwood

datasetdata和dataset有什么区别呢?

这一段代码:(出现相关代码,只有几行,麻烦往下看,鞠躬!!1 )

EjbClientDataSet dataSet = sb.getClientDataModule().getUserDataSet();

//获取clientdatamoule里的userdataset并加入一新记录

dataSet.open();

dataSet.insertRow(false);

dataSet.setString("Username", username);

dataSet.setString("Password", password);

dataSet.post();

---------------------------------------//以上servelt 的代码

userDataSet.setSessionBeanConnection(sessionBeanConnection);

userDataSet.setExecuteOnOpen(false);

userDataSet.setMethodName("UserLogin");

userDataSet.setColumns(new Column[] {Username, Password});

-------------------------------///////////clientdatamodule的代码

com.borland.dx.dataset.DataSetData dataSetDataArray = com.borland.dx.dataset.DataSetData.extractDataSetChanges(clientdata.getUserDataSet());

------------------------------///会话bean的代码

但此时服务器提示下列错误:

2003-04-12 21:37:48 错误 [ejb.crm_clientmanagement.serverdatamodule] com.borland.dx.dataset.DataSetException

com.borland.dx.dataset.DataSetException

at com.borland.dx.dataset.DataSetException.a(Unknown Source)

at com.borland.dx.dataset.DataSetException.throwException(Unknown Source)

at com.borland.dx.sql.dataset.ResolutionManager.saveChanges(Unknown Source)

at com.borland.dx.ejb.EntityBeanConnection.saveChanges(Unknown Source)

at crm_clientmanagement.serverdatamoduleBean.adduser(serverdatamoduleBean.java:107)

at crm_clientmanagement.serverdatamoduleBean_ObjectImpl_36.adduser(<generated>)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at com.apusic.invocation.rmi.IllIIlIllllllIll._$1(Unknown Source:346)

at com.apusic.invocation.rmi.IllIIlIllllllIll.invoke(Unknown Source:94)

at crm_clientmanagement.serverdatamodule_DynamicStub.adduser(<generated>)

at crm_clientmanagement.clientBean.addUser(clientBean.java:80)

at crm_clientmanagement.clientBean_ObjectImpl_35.addUser(<generated>)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at com.apusic.invocation.rmi.IllIIlIllllllIll._$1(Unknown Source:346)

at com.apusic.invocation.rmi.IllIIlIllllllIll.invoke(Unknown Source:94)

at crm_clientmanagement.client_DynamicStub.addUser(<generated>)

at crm_clientmanagement.sessionBean.addUser(sessionBean.java:47)

at crm_clientmanagement.newuserservlet.doPost(newuserservlet.java:47)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.apusic.servlet.http.lllllIIllIIlIlIl._$1(Unknown Source:800)

at com.apusic.servlet.http.lllllIIllIIlIlIl._$1(Unknown Source:642)

at com.apusic.servlet.http.IIlIIIIlIIlIIllI._$1(Unknown Source:192)

at com.apusic.servlet.http.lllIIlIIIIIlIlII._$1(Unknown Source:285)

at com.apusic.servlet.http.llIlllllIllIIIll._$1(Unknown Source:25)

at com.apusic.servlet.http.lIllIIllllllIlll._$3(Unknown Source:238)

at com.apusic.servlet.http.lIllIIllllllIlll._$1(Unknown Source:142)

at com.apusic.servlet.http.lIllIIllllllIlll.run(Unknown Source:70)

EntityBeanConnection.saveChanges(dataSetDataArray, new DataSet[] {userDataSet});