Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...