Skip to content

Instantly share code, notes, and snippets.

@kllaudyo
Last active August 23, 2018 16:14
Show Gist options
  • Save kllaudyo/a5e570d8e199f29529a4e768b98e7b9f to your computer and use it in GitHub Desktop.
Save kllaudyo/a5e570d8e199f29529a4e768b98e7b9f to your computer and use it in GitHub Desktop.
<!--#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 & "&nbsp;<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