Geek Speak — HabitableZone

Geek Speak » in reply to Well, how 'bout posting your solution REB?

re: Well, how 'bout posting your solution REB?

Public Function PopulateDestination() As ArrayList
Dim cnDest As New SqlConnection("server=*****;integrated security=true;" + "database=****")
Dim cmdDest As New SqlCommand("StoredProcedurePopDest", cnDest)
cmdDest.CommandType = CommandType.StoredProcedure
Dim drDest As SqlDataReader
cnDest.Open()
drDest = cmdDest.ExecuteReader()
Dim alNames As New ArrayList()
While drDest.Read()
alNames.Add(drDest.GetValue(0))
End While
drDest.Close()
cnDest.Close()
End Function

'Note the Database and Server has been hidden for security reasons

Then I place the Function PopulateDestination where I want my program to exicute the Stored Procedure. The Stored Procedure I wrote is a very simple one. It is just moving some data from one column to another.

Log in or register to post.

The whole thread (7 posts)