Stored Procedure instance:
Procedure test_c (temp out varchar2, A in varchar2, B in varchar2)
Is
Begin
Temp: = A | B;
End;
Call method:
Note: you must add Imports system. Data. oledb to the beginning of the program.
Dim dbconn as new oledbconnection
Dim dbcomm as oledbcommand
Dbconn. connectionstring = "provider = msdaora.1; user id = xxx; Password = xxx; Data Source = xxx ;"
Dbconn. open ()
Dbcomm = dbconn. createcommand
Dbcomm. Parameters. Add ("Temp", oledbtype. varchar, 30). Direction = parameterdirection. Output
Dbcomm. Parameters. Add ("A", oledbtype. varchar, 30). Direction = parameterdirection. Input
Dbcomm. parameters ("A"). value = "test"
Dbcomm. Parameters. Add ("B", oledbtype. varchar, 30). Direction = parameterdirection. Input
Dbcomm. parameters ("B"). value = "OK"
Dbcomm. commandtext = "{call test_c (?,?,?)} "'Is used here "? "To replace Parameters
Dbcomm. commandtype = commandtype. Text
Dbcomm. executenonquery ()
Dbconn. Close ()
MessageBox. Show (dbcomm. parameters ("Temp"). value)