K
Karen Middleton
Jeff
I have a scaled down application running on SQL Server. I SQL we are
using cursors in stored procedures in many places to things like the
following:
DECLARE myCursor CURSOR FOR
SELECT au_id FROM authors FOR UPDATE
DECLARE @au_id VARCHAR(10)
OPEN myCursor
FETCH NEXT FROM myCursor INTO @au_id
WHILE (@@FETCH_STATUS = 0)
BEGIN
DELETE FROM otherTable WHERE au_id = @au_id
DELETE FROM authors WHERE CURRENT OF myCursor
FETCH NEXT FROM myCursor INTO @au_id
END
CLOSE myCursor
DEALLOCATE myCursor
Please note this is jst one example there are many such scenarios
where I use a cursor for various processing I want to do a similar
thing in Access with VBA open a query for select and step through each
recordset and do various processing on other tables. Also, like in SQL
Server cursor can permit a select for update I would like to do the
same in Access.
Please note I cannot use MSDE for this application which is running
currently over users want this small application in Access and hence I
am converting from SQL to Access but I am plagued by several problems
including lack of stored procedures in Access but our users want
Access I am helpless.
Please let me know how I can do these things as above in Access
Macros/VBA in DAO or ADO
Thanks
Karen
I have a scaled down application running on SQL Server. I SQL we are
using cursors in stored procedures in many places to things like the
following:
DECLARE myCursor CURSOR FOR
SELECT au_id FROM authors FOR UPDATE
DECLARE @au_id VARCHAR(10)
OPEN myCursor
FETCH NEXT FROM myCursor INTO @au_id
WHILE (@@FETCH_STATUS = 0)
BEGIN
DELETE FROM otherTable WHERE au_id = @au_id
DELETE FROM authors WHERE CURRENT OF myCursor
FETCH NEXT FROM myCursor INTO @au_id
END
CLOSE myCursor
DEALLOCATE myCursor
Please note this is jst one example there are many such scenarios
where I use a cursor for various processing I want to do a similar
thing in Access with VBA open a query for select and step through each
recordset and do various processing on other tables. Also, like in SQL
Server cursor can permit a select for update I would like to do the
same in Access.
Please note I cannot use MSDE for this application which is running
currently over users want this small application in Access and hence I
am converting from SQL to Access but I am plagued by several problems
including lack of stored procedures in Access but our users want
Access I am helpless.
Please let me know how I can do these things as above in Access
Macros/VBA in DAO or ADO
Thanks
Karen