+ Reply to Thread
Results 1 to 2 of 2

Counting records

  1. #1
    Slim Jim
    Guest

    Counting records

    Hi there

    I am connecting to a SQL Server stored procedure in Excel
    VBA.

    However, I am having difficulty COUNTING the number of
    records returned from that Stored Procedure.

    I have this code...

    Dim conDB As New ADODB.Connection
    Dim rstSP As New ADODB.Recordset
    Dim strConnect As String

    strConnect = "driver={sql server};server=
    (local);database=mydb;uid=;pwd=;"


    With conDB


  2. #2
    JM
    Guest

    Re: Counting records

    Where is the rest of the code? If you are assigning the return value of the
    sp call to a rs, then just get the recordcount property of the rs.



    "Slim Jim" <[email protected]> wrote in message
    news:[email protected]...
    > Hi there
    >
    > I am connecting to a SQL Server stored procedure in Excel
    > VBA.
    >
    > However, I am having difficulty COUNTING the number of
    > records returned from that Stored Procedure.
    >
    > I have this code...
    >
    > Dim conDB As New ADODB.Connection
    > Dim rstSP As New ADODB.Recordset
    > Dim strConnect As String
    >
    > strConnect = "driver={sql server};server=
    > (local);database=mydb;uid=;pwd=;"
    >
    >
    > With conDB
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1