Could it be that the file does not only contain PL/SQL? Comments in PL/SQL are
or
-- comment
Calling PL/SQL from VB .NET may basically be performed by executing the PL/SQL text like:
Dim sSQL As String
Try
'create and use a function
sSQL = "CREATE OR REPLACE FUNCTION MyMultiply( " & vbLf & _
"ifactor1 IN NUMBER, " & vbLf & _
"ifactor2 IN NUMBER " & vbLf & _
") RETURN NUMBER IS" & vbLf & _
" iResult NUMBER;" & vbLf & _
"BEGIN" & vbLf & _
" iResult:=iFactor1*iFactor2;" & vbLf & _
" RETURN iResult;" & vbLf & _
"END;"
Dim aCmd As New OracleCommand(sSQL, OracleConnection1)
aCmd.CommandType = CommandType.Text
OracleConnection1.Open()
aCmd.ExecuteNonQuery()
'
aCmd.CommandText = "SELECT MyMultiply(5, 7) FROM dual"
MessageBox.Show(aCmd.ExecuteScalar().ToString)
Catch ex As Exception
MessageBox.Show(ex.ToString)
Finally
OracleConnection1.Close()
End Try
but there are traps for example using multiple PL/SQL statements in one call to "Execute...".