Last active
August 23, 2018 16:14
-
-
Save kllaudyo/a5e570d8e199f29529a4e768b98e7b9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--#include file="adovbs.inc"--> | |
<% | |
Dim iParameter1 = 0 | |
Dim iParameter2 = 0 | |
Set oConn = Server.CreateObject("adodb.connection") | |
oConn.ConnectionString = "Provider=MSDAORA.1;Password=password;User ID=user;Data Source=service_name;Persist Security Info=True;PLSQLRSet=1" | |
oConn.Open | |
sSQL = "{call procedure_oracle({resultset 0, RS}, ?, ?)}" | |
Set oCmd = Server.CreateObject("ADODB.Command") | |
oCmd.ActiveConnection = oConn | |
oCmd.ActiveConnection.CursorLocation = adUseClient | |
oCmd.CommandType = adCmdText | |
oCmd.CommandText = sSQL | |
oCmd.Parameters.Append oCmd.createParameter("@parameter_1", adBigInt, adParamInput, , iParameter1) | |
oCmd.Parameters.Append oCmd.createParameter("@parameter_1", adBigInt, adParamInput, , iParameter2) | |
Set oRs = oCmd.Execute | |
Set oCmd.ActiveConnection = Nothing | |
Set oRs.ActiveConnection = Nothing | |
Set oCmd = Nothing | |
sHTML = "" | |
If Not oRs.EOF Then | |
sHTML = sHTML & " <select>" | |
Do While Not oRs.EOF | |
sHTML = sHTML & "<option value="& oRs(0) &">" & oRs(1) & "</option>" | |
oRs.MoveNext | |
Loop | |
sHTML = sHTML & "</select>" | |
Response.Write sHTML | |
End If | |
Set oRs = Nothing | |
oConn.Close | |
Set oConn = Nothing | |
%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment