如何部署EAServer with DataStore . i will give you very simple sample.
-- server side ----
1. make sure you have EAServer installed, start it
2. select EAServer profile from menu tools , create easerver profile
3. in pb9 existing Workspace , new Target->EAServer component , follow the wizard
4. in activate event of this component ,
// Profile asa
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=EAS Demo DB V9;UID=dba;PWD=sql'"
connect;
in Deactivate event
disconnect;
5. new Datawindow , you can use department table
6. add new function , uf_test ,
datastore lds
blob lb_ds
lds = create datastore
lds.dataobject = 'd_dept'
lds.SetTransObject(sqlca)
lds.Retrieve()
lb_ds = lds.GetFullState()
return lb_ds
7. open project , make sure you have checked 'Include Unreferenced Objects in Consolidate PBD'
8. deploy it to your EAServer
--- client side ----
1. new application target ,
2. connection object , follow the wizard
3. new EAServer proxy wizard , select the package and component you deployed just now
4. click deploy toolbar item , deploy the proxy
5. new window , insert button and DW control, in click event of this button
n_genapp1_connction mycnn
n_genapp obj
blob lb_r
mycnn = create n_genapp1_connection
mycnn.connecttoserver()
mycnn.Createinstance(obj,'myPackageName/myComponentName')
lb_r = obj.uf_test()
dw_1.SetFullState(lb_r)
6. run it
如何部署EAServer with DataStore . i will give you very simple sample.
1. make sure you have EAServer installed, start it
2. select EAServer profile from menu tools , create easerver profile
3. in pb9 existing Workspace , new Target->EAServer component , follow the wizard
4. in activate event of this component ,
// Profile asa
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=EAS Demo DB V9;UID=dba;PWD=sql',ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT'"