|
-
Feb 15th, 2006, 03:41 PM
#1
Thread Starter
Frenzied Member
This is pissing me off (AffectedRows)
Why would the recordset not return the number of rows affected, I have example in a book that show a select returning the number of rows selected !!
VB Code:
Public Function RunQuery(ByRef QueryString)
Dim AffectedRows
Set rs = conn.Execute("SELECT * FROM ve_forms ORDER BY title ASC" , AffectedRows, adCmdText)
RunQuery = AffectedRows
End Function
Selecting for now in a MS Access database and I tested my queries and it does work.
Thanks
-
Feb 16th, 2006, 05:10 AM
#2
Re: This is pissing me off (AffectedRows)
you could try putting RETURN @@Rowcount in the sql statement, this will return a message like '13 row(s) affected'
-
Feb 16th, 2006, 07:52 AM
#3
Thread Starter
Frenzied Member
Re: This is pissing me off (AffectedRows)
Where in the statement, I never used the @@Rocount before.
But why is the AffectedRows not working, it's suppose too !!!
Thanks
-
Feb 16th, 2006, 08:27 AM
#4
Re: This is pissing me off (AffectedRows)
Im no expert on SQL but i read that you could put RETURN @@Rowcount at the end of the query so like 'SELECT * FROM ve_forms ORDER BY title ASC RETURN @@Rowcount
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|