JScript & ADO - RecordsAffected field

Results 1 to 2 of 2

Thread: JScript & ADO - RecordsAffected field

  1. #1
    Kok Hoor Guest

    Default JScript & ADO - RecordsAffected field

    The execute statement of the ADO Connection object has<BR>a syntax like this:<BR><BR>Connection.Execute (sql, RecordsAffected, Options);<BR><BR>My problem is, whatever I pass in as RecordsAffected parameter,<BR>I can&#039t get the value back. For example, if I do this:<BR><BR>var i = 5;<BR>Connection.Execute("DELETE FROM Customer", i, adReadOnly);<BR>Response.write(i + "<BR>");<BR><BR>I&#039ll always get a 5 in return. I&#039ve tried passing in a Number object, eg. var i = new Number(5), but it is still the same.<BR><BR>Please help.

  2. #2
    Joe Fawcett Guest

    Default RE: JScript & ADO - RecordsAffected field

    The field should contain a &#039dummy&#039 variable that can be examined later. Just pass in i in your example but don&#039t set an initial value. Without looking it up I believe that not all providers fill it in anyway and also if you &#039SET NOCOUNT ON&#039 in SQL server it won&#039t work.<BR>

Posting Permissions

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