Tags: application, basic, client, database, dbms_application_info, dbms_application_infoset_client_info, example, mysql, oracle, set_client_info, somebody, sql, visual
dbms_application_info.set_client_info how to use
Somebody know how can I to use dbms_application_info.set_client_info in Client application ? Visual Basic for example ?
Leave a comment...
- 6 Comments
- You can use it as any other package/procedure. It stores up to 64 bytes in CLIENT_INFO column of V$SESSION dynamic view.#1; Sat, 23 Feb 2008 13:39:00 GMT
- Assuming you know how to call stored procedures in Oracle from VB, you'd simply call this and pass in the client_info you want to set. SET_CLIENT_INFO takes a single VARCHAR2 parameter...
Justin#2; Sat, 23 Feb 2008 13:40:00 GMT
- Sorry , but I did not undestand
.ActiveConnection = Myconexion
.CommandType = adCmdStoredProc
.CommandText = Nyprocedure
.Parameters.Append .CreateParameter("p1", adVarChar, adParamOutput, 2000, "")
.Parameters.Append .CreateParameter("p2, adVarChar, adParamInputOutput, 2000, p_sNomeArq)
.Parameters.Append .CreateParameter("p3, adVarChar, adParamOutput, 2000, pSET_CLIENT_INFO ) ??
end with#3; Sat, 23 Feb 2008 13:41:00 GMT
- Now I'm confused. Why are you creating 3 parameters to call a procedure that takes 1 argument?
As a general sanity check, can you call any stored procedure? In other words, are you asking how to call stored procedures in your framework of choice? Or just how to call this particular procedure?
Justin#4; Sat, 23 Feb 2008 13:43:00 GMT
- Sorry, It is only a example
Call Stored Procedure I know, Iwant to use dbms_application_info.set_client_info inside Procedure and return to VB
I wante in package/procedure that while is processing returnig in real time what is happened , (insert, updat , reading ...etc)
Message was edited by:
muttleychess#5; Sat, 23 Feb 2008 13:44:00 GMT
- Now I'm completely lost. Trying to call SET_CLIENT_INFO is only an example of what you're having a problem with? SET_CLIENT_INFO is an example of what you want your procedure to do? Something else?
A stored procedure cannot return status information to the caller until the end of the call. You can use DBMS_APPLICATION_INFO to indicate where a long-running call is, but you will need another session to read the information. If session 1 makes a long-running call, for example, your application will need a second thread and a second session in order to read the information set by the first session.
You will want to read up on all the procedures in the DBMS_APPLICATION_INFO package, particularly SET_SESSION_LONGOPS if you intend on tracking the progress of a long-running procedure.
Justin#6; Sat, 23 Feb 2008 13:45:00 GMT