EaserVer (jaguarts) developer must read

zhaozj2021-02-17  53

Sybase Enterprise Application Server Novice

Sybase Easerver's article is also available, rarely mentioned some of the details of the development. I have been working in Jaguart, and I have encountered many details. I want to come to Jaguarts developers will also meet, to do a reference, and there are many problems in my heart. Therefore, I wrote this article, and I will take a brick to introduce jade. I hope. JAGUARCTS master Doubt, deep gratitude.

I. System configuration sections: 1, running environment: Win2000 Server version, SP2 patch, P3850CPU, PB8.0Beta Easer3.6.1.2, Run Environment Installation Notes: Jaguarcts Server does not install it into NT service in the development environment, because development The Jaguarcts components often modify, there will be an error in "Object Can't Save", if not NT service, use Jaguar Server (Debug). Such errors can restart J Aguar Server (Debug). If the NT service is installed, you can use the following instructions to delete: ServerStart ServiceName? -Remove? (ServerName is the service name of JAGUAR in the NT service) Win2000 Server Edition must play patch, in fact, SP1 can, otherwise it will not generate a proxy (Proxy). 3, launch JAGUAR manager (Figure (1)) (a) JAGUARMAGAGER menu Tool / Connect / Jaguar Manager.

(B) Point Profile Manager can add a Profile. (C) Enter JagAdmin (D) Password by default as empty in user name. (E) Host Name can be Localhost. (If you have some experience, it can be changed to your machine name, but after connecting successfully in Connect, you must go in to modify the host name of each port in Listener.) 4, start the security manager (Figure (2)) (a) jaGuarmanager Menu TOOL / Connect / Security Manager. (B) PIN Default Password is "Sybase" 5, modify jagadmin's password (a) After the connection is successful, double-click Servers in JAGuarManager, display all services, select the service and right click, select SERVER Property in the Right-click menu. Attribute panel. (B) Select SECURITY to change the password in the attribute panel.

6. Managing connection buffers (a) Double-click Servers in JAGUARManager and select a Server in the list. (B) Select the INSTALL Connection Caches (c) to select "CREATE AND INSTALL A New Connection Cache" on the pop-up window to enter the Connection Cache name in the pop-up window. (E) After confirming, enter the Connection Cache Configuration Panel. (F) This article is used to configure SQLServer as an example. Configure: Server Name is the service name for SQL Server. User name Enter Password for the user ID of the SQLServer. The ODBC is selected in the Driver tab, and the DLL or class name is ODBC32.DLL. Ping try it. (G) If the ping is not, you have to see what Hostname you mentioned in front of this article, what you entered, if localhost is not, change it to your machine name.

Second, the development application part A, the server: 1. New Easerver Profile is shown below. Server name is the computer name. Port Number is 9000, login name is jagadmin. 2, in the new ----? Target ----? Easerver Component Start Wizard 3, Next-? NEXT-? App Name, Library File Storage -? NEXT-? IMPLEMENT NEW INTERFACE -? PBOBJECTNAME (n_cst_base)? Easerver Component Name -? Easerver profile -? Pakeage Name (Components By the package, add a package or choose an existing package) -? COMPONENT TYPE (STADARD COMPONENT) - - INSTANCE POOLING OPTIONS (Supported) - ? Transaction supported (not supported) -? Interface options -? Other Options -? PROJECT (NEXT) - NEXT -? NEXT -? Finish4, open the components you just created N_CST_BASE, in the constructor event: ?? sqlca.dbms ?????? = "MSS Microsoft SQL Server 6.x" ?? sqlca.database ?? = "jaguar_2001" ?? SQLCA.ServerName = "jaguarts" ?? Sqlca.logid ????? = "sa" ?? sqlca.autocommit = false ?? sqlca.dbparm ???? = "" ?? CONNECT using sqlca; ?? if sqlca.sqlcode = -1 THEN??? ?? MessageBox ("system", "database connection failed!" SQLCA.SQLERRTEXT) ?? End IF5, in the N_CST_BASE DESTRUCTOR event: ?? Disconnect applications SQLCA; 6, add an object function in n_cst_basek: of_user_login String as_userid, string as_password) RETURN INTEGER / / INTEGER? Li_RETURNSELECT Count (*) Into: li_return from jag001 where jag0101 =: as_useri D and jag0102 =: As_password; Return Li_RETURNJAG001 Field: jag0101 (varchar (20)) - JAG0102 (VARCHAR (20)) 7, generate component agent object new -? project ----? Easerver proxy wizard has been NEXT, It is worth noting that when there is a TreeView, let you choose a package (that is, the package created in 3), the next step is to choose an agent library (you can choose the PBL, you can add a PBL), next is deployment after NEXT. Actions, choose three (proxy object name = package name component name) 8, if no accident, the agent object is generated. B, client: 1, create a new application.

2, create a new connection object new -? PBObject -? Connection Object Wizard, which is worth noting that Connectivity Options (Requires Easer Connection); Pakage Name is the package created in 3. The Connection Object name can be default, or you can enter; Resource of Connect Information can be optionally one. 3, in an event open new application:?? N_cst_connect inv_connect_srv ???????? // 2 connection object declaration Jaguar_2001_n_cst_base created inv_login_srv ?? // proxy object is declared integer ??????? li_returninv_connect_srv = CREATE n_cst_connectli_return = INV_CONNECT_SRV.CONNECTTOSERVER () ??

TRY ?????????????????? // create a proxy object inv_login_srvli_return? = Inv_connect_srv.CreateInstance (inv_login_srv, "Jaguar_2001 / n_cst_base") CATCH (cts_pbuserexception uae) ??? li_return = 999END Try

IF li_return <> 0 THEN ??? MessageBox ("ERROR INFO", "ErrorCode =" String (Inv_Connect_Srv.errcode "~ Nerrtext =" Inv_Connect_srv.errtext) Endix

TRY ???????????? //? Log in, a line of data (xzh2000, 1000000)? ??? Li_RETURN = INV_LOGIN_SRV.OF_USER_LOGON ('xzh2000', '000000') Catch (CTS_PBUSEREXCEPTION) UAE1) ??? li_return = 999nd TRY

If? Li_return? = 1 THEN? MessageBox ("System", "OK") Else ?? MessageBox ("System", "CANCEL") endiff

Three Description: This article is in the case of JAGUAR Manage (Debug), if you have questions, please send email: to: xzh2000@fm365.com

?

转载请注明原文地址:https://www.9cbs.com/read-30305.html

New Post(0)