Results 1 to 3 of 3
  1. #1
    Join Date
    May 2002
    Posts
    395

    Unhappy Unanswered: append recordset returned from a stored procedure

    I have a recordset returned from a stored procedure executed in the form open event. Could this recordset append to the form's recordsource property in the form's open event in VB? if so, what's the syntax?

    Private Sub Form_Open(Cancel As Integer)
    dim ...

    Set add_bag_results = Nothing
    With add_bag_results
    .ActiveConnection = CurrentProject.Connection
    .CommandType = adCmdStoredProc
    .CommandText = "spSampling_add_bag_results"
    .Parameters.Append .CreateParameter("ret_val", adInteger, adParamReturnValue)
    '.Parameters.Append .CreateParameter("@lotnum", adInteger, adParamInput, 4, rs_add_bag_results(1))
    .Parameters.Append .CreateParameter("@lotnum", adInteger, adParamInput, 4, lot_n)
    ..
    Set rs_add_bag_results = .Execute
    End With

    Me.RecordSource = rs_add_bag_results ?

    Thanks!

  2. #2
    Join Date
    Apr 2003
    Location
    Washington DC area
    Posts
    1,770

    Cool Append

    I think this is a very insightfull question but your on the wrong forum for this I think. Try Extreme, VB.com, the response is just as quick and it's the same format as this forum. Frankly, I don't know vb but when I had to use it with asp.net I used Extreme vb forum for my code.

  3. #3
    Join Date
    May 2002
    Posts
    395
    Thanks for your reply. I did figured it out. You are right and I have posted my questions on vb extreme forum before. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •