Home » Open Source » Programming Interfaces » Executing a Stored Procedure with visual basic 6 (Oracle 9.2e)
Executing a Stored Procedure with visual basic 6 [message #288171] Sat, 15 December 2007 05:48 Go to previous message
grupoapunte
Messages: 5
Registered: September 2007
Junior Member
Hey, im developing an aplication that uses stored procedures from an oracle DB, i found a sample code to do this, but i think its a bit long if i have to do the same thing for every procedure, the question is if its posible to use the execute command with the procedure and the params all in one line, for example:

Set rsFiltro1 = cnOracleDb.Execute("PROCEDURE NAME AND PARAMS GOES HERE")


This is the sample code that i found:
Conn.Open "PROVIDER=OraOLEDB.Oracle;DATA SOURCE=xxxxx;” & _
“USER ID=xxxxxx;PASSWORD=xxxxxx;PLSQLRSet=1"
    
Cmd.ActiveConnection = Conn
Cmd.CommandType = adCmdStoredProc
Cmd.CommandText = "AL_PACKAGE.AL_PROCEDURE1"

Cmd.Parameters.Append Cmd.CreateParameter("SiteID", adVarChar, adParamInput, 10, TxtQuery.Text)

Cmd.Parameters.Append Cmd.CreateParameter("ErrCode", adVarChar, adParamOutput, 10)

Set RS = Cmd.Execute


Thanks
 
Read Message
Read Message
Read Message
Previous Topic: Connection with the server (merged)
Next Topic: Maximum cursor overloaded problem
Goto Forum:
  


Current Time: Tue Apr 23 05:51:15 CDT 2024