Cannot Delete Using ADO and sqlServer 2005
- From: "Barry George" <bgeorge1@xxxxxxxxxxxxxx>
- Date: Fri, 9 Nov 2007 08:16:56 -0700
Greetings,
I am in the process of upgrading an Access application from Access 2000 to
Access 2007 with a backend going from sqlServer 7 to sqlServer 2005.
In the following example, at the .delete statement I get an error stating;
"Could not find server "SERVERName" in sysservers. Execute
sp_addlinkedserver to add the server to sysservers.
The code is supposed to delete all the records from a table and has nothing
to do with a
linked server.
The connection "cnn" has already been established elsewhere.
Dim rs as new adodb.recordset
rs.open "rsTable", cnn, adOpenDynamic, adLockOptimistic
With rs
.Movefirst
Do
.Delete 'Execution stops here.
.movenext
if .eof then exit do
Loop
End with
P.S. This code works with Access 2007 connected to the sqlServer 7 data, but
not the sqlServer 2005 data.
Any suggestions would be greatly appreciated.
--
Regards,
Barry George
.
- Follow-Ups:
- Re: Cannot Delete Using ADO and sqlServer 2005
- From: Tom van Stiphout
- Re: Cannot Delete Using ADO and sqlServer 2005
- From: Sylvain Lafontaine
- Re: Cannot Delete Using ADO and sqlServer 2005
- Prev by Date: Re: Form Control Reference in SQL Server 2005
- Next by Date: Re: ÐÂÎÅ×é
- Previous by thread: Re: Form Control Reference in SQL Server 2005
- Next by thread: Re: Cannot Delete Using ADO and sqlServer 2005
- Index(es):
Relevant Pages
|