Filling DataSet

Description :


The following code snippet explains how to call a store procedure, establish connection, retrieve records and fill in the dataset.


Public Function Load() As DataSet
Dim oDataSet As New DataSet
Try
Dim sSp_Name As String = "Exec Sp_Name"
Dim con As SqlConnection = OpenCnn()
Dim oDA As New SqlDataAdapter(sSp_Name, con)
oDA.Fill(oDataSet)

Catch ex As Exception
Throw ex
End Try
Return oDataSet
End Function


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: