My DTS does not recognized RecordCount Property

  • Hai .....,

                 I have written a DTS whose purpose is to dispatch mails to all the customers. It gets the customer information by executing a stored procedure. When I try to view the record count using RecordProperty of RecordSet object, it says that it does not recognizes this command. I don't know what exactly is required is set it up and run.

                I 'm Sql Server 2000 with SP3a.

  • This was removed by the editor as SPAM

  • I assume you are using an ActiveX Task to parse the recordset (since to reference the RecordSet object). Try using "RecordCount" property of the recordset.

    See the following Microsoft article for more info:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmthnextrecx.asp

    Keep in mind:

    "Reading the RecordCount property on a closed Recordset causes an error."

    "The cursor type of the Recordset object affects whether the number of records can be determined. The RecordCount property will return -1 for a forward-only cursor; the actual count for a static or keyset cursor; and either -1 or the actual count for a dynamic cursor, depending on the data source."

  • Hai Don,

                Thanx for you reply. I 'm using the CreateObject method on the COM object ADODB.RecordSet and no activex for this in any manner

                Then I discovered that ActiveX doesn't get hold of the COM object when we are running the package from another machine. Yes the package is created by me from machine3 to machine7.

                When I copy the same package to my machine machine3, everything seems to work fine. I know that we have to do something ...some permission settings so that activex scripts are allowed but don't know how to do this

    Anyways I will be waiting for a solution to this and I will post when i find

  • Another trick I have used is to do a MoveLast in the RecordSet and then check the RecordCount then finally do a MoveFirst.

    Good Luck,

    Darrell

  • Hai Darrell,

                   Thanx for your helpful tip man...But I will be able to adapt this only when the instance of the RecordSet oRs really gets hold of an recordset object and this happens only when I 'm creating a recordset object in another sqlserver registered from my sqlserver. Yes the package that holds all this is in another machine machine7, and I have created this from my machine machine3.

    One more thing...I don't get error message when I have created the package locally in my instance of the sql server. Its only the case of permitting remote user to execute the script i.e. from machine3 to machine7 in my case.

     

  • Quick question... do you have local access to the server you are remotely executing the package on? Does the DTS package execute locally on that server?

  • Yes, I have local access to the server.

    Now that I have created a package from my system machine3 on to the server machine machine7. In this case I 'm able to execute the package on the server only from my system. But when I go to the server and execute the same package there, I get error.

    Had I created the package directly on to the server machine right by sitting there, it would execute only when i execute there itself instead from my machine

    Hope your are getting the picture of my problem

     

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply