############### jzOraPerl.pl is a collection of subroutines accessing Oracle # Author Jeff Zhuk ########## oraperl instead of perl required !!!! ################## ####################### dbOraLogin login to Oracle and return a handler sub dbOraLogin { local($sys_id,$userID,$password) = @_; # get arguments local($lda) = &ora_login($sys_id,$userID,$password); return $lda; } sub dbGetAddress { local($lda, $name)=@_; local ($result, $select, $address); ################ form SQL select statement ################## $select = "SELECT address FROM addressTable WHERE name = $name"; ################ open Oracle DB for a selection ####### $result = &ora_open($lda, $select); # we use ORA handler and SQL statement ############### fetch the result of the query ################ ($address) = &ora_fetch($result); ############### close the database connection ################# &ora_close($result); ################### return the address ######################## return $address; } 1; # end of file with subroutines