Delete record link table?

M

MN

Hi all,
I using MS Access 2000 open link table to MS SQL 2000
Server.
How can I delete the records from the link?
Here my code:

Set rs = db.OpenRecordset("select * FROM dbo_employee", _
dbOpenDynaset, adLockOptimistic)
With rs
.MoveFirst
Do While Not .EOF
rs.Delete
.MoveNext
Loop
.Close
End With

I got an error @ rs.delete "Can not update. Database read
only"
Any advise?
Thanks
 
J

JohnFol

This is incredibly inefficient. Why do you not do a "Delete From
dbo_employee" as a server side piece of code?

Also with Access / SQL 2000, use ADO instead of DAO, or even a SQL stored
procedure
 
M

MN

Yeah, you right. But:
How can I do that? In side the form when the user click to
OK button to delete whole table in order to import a new
record set ?
How can I try a SQL stored procedure?
I tried ADODB with the same result "Can not update
database!"
Any advise? Thank inadvance.
MN
 
M

MN

Never mind. I got it work.
MN
-----Original Message-----
Yeah, you right. But:
How can I do that? In side the form when the user click to
OK button to delete whole table in order to import a new
record set ?
How can I try a SQL stored procedure?
I tried ADODB with the same result "Can not update
database!"
Any advise? Thank inadvance.
MN dbo_employee",
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top