trend Posted May 9, 2006 Posted May 9, 2006 Hello, I connect to my db over oledb connection. I open 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 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! Quote
Administrators PlausiblyDamp Posted May 9, 2006 Administrators Posted May 9, 2006 The data reader also exposes a NextResult method this will advance you to then 2nd result set. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
trend Posted May 10, 2006 Author Posted May 10, 2006 Great! that along with me not myreader.read was the problem.. thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.