Hello, I connect to my db over oledb connection.
I open
but then from there.. i try to myreader.getstring(0) (I get back 6 variables).. and I keep getting an error saying that there is no text in the column or something like that. I know this sp returns 2 tables if you will ..because I exec sp_whatever directly to the db server.
I think my problem is something new that I am trying to learn to do.
I basically have a sp like:
create procedure dbo.whater @value char(15)
as
select value, value2
from yada
where @value = value
select value3, value4
from yada2
where @value = value
go
Well.. my syntax on the SP might not be right (as i am typing from my head).. but you see what I am doing.. How am i suppose to get returned value from 2 select statements?
thanks!
I open
Code:
Dim myCmd As New OleDb.OleDbCommand("sp_whatever")
Dim myReader As OleDb.OleDbDataReader
myCmd.Connection = MyConnection
myCmd.CommandType = CommandType.StoredProcedure
myCmd.Parameters.Add("@value", value)
Try
MyConnection.Open()
myReader = myCmd.ExecuteReader
I think my problem is something new that I am trying to learn to do.
I basically have a sp like:
create procedure dbo.whater @value char(15)
as
select value, value2
from yada
where @value = value
select value3, value4
from yada2
where @value = value
go
Well.. my syntax on the SP might not be right (as i am typing from my head).. but you see what I am doing.. How am i suppose to get returned value from 2 select statements?
thanks!