I'm trying to run a query from a .NET page but I seem to having some problems with having multiple queries.
My query is similar to this
SELECT * FROM table1; SELECT * from table2
But i seem to get an invalid character error when executing this from a .Net page. It runs fine in SQL developer but only fails when i put it in my .NET page.
I've added the BEGIN
and END
to the query as some websites suggest you need this to run multiple queries but then I get the following error
ORA-06550: line 1, column 7: PLS-00428: an INTO clause is expected in this SELECT statement
Can anyone shed any light on this one?
Thanks in advance!
EDIT
Here's some code
query = conn.CreateCommand()
query.CommandText = "SELECT * from table1; SELECT * FROM table2;"
DataSet = New DataSet()
DataAdapter = New DataAdapter(query)
DataAdapter.Fill(DataSet)
datagrid1.DataSource = DataSet.Tables(0)
datagrid1.DataBind()
lbl1.Text = DataSet.Tables(1).Rows(0).Item("column1").ToString()