Cannot Delete Using ADO and sqlServer 2005

Tech-Archive recommends: Fix windows errors by optimizing your registry



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


.



Relevant Pages

  • Re: SQL Server stops responding
    ... should be deployed to a dedicated server for best usage. ... Services showed that the SQLServer and SQLServerAgent were both running but I ... In the SQLServer error logs occasionally there is the entry 'LogEvent: Failed to report the current event. ... SQL Server is terminating this process. ...
    (microsoft.public.sqlserver.server)
  • RE: BAM Service and TDDS lock error
    ... Please let me know if this doesn't resolve the issue. ... Either another TDDS is processing the same data or there is an orphaned ... session in SQL server holding TDDS lock.Timeout expired. ... SQLServer: SQLServerName, Database: BAMPrimaryImport. ...
    (microsoft.public.biztalk.general)
  • Re: Connecting to SQL database
    ... but the connection string should be the same) ... Can you connect to the server using SqlServer Management Studio? ... which is oodles less typing than straight ADO. ...
    (comp.lang.python)
  • Re: sqlserver 2000 - profiler problem!
    ... Domainadministrator angemeldet und kann Profiler mit obigen Server verbinden ... Habe von jemand in Newsgroup Rat bekommen nach Sqlserver 2000 und SP3 ...
    (microsoft.public.de.sqlserver)
  • copy database error 12291 and 208
    ... when trying to copy a database from SQLSERVER 2000 To SQLSERVVER 2005 using Copy Database Wizard it fails and give two errors in events: ... InnerException-->An error has occurred while establishing a connection to the server. ... destination server is running Windows 2003 server and SQLSERVER 2005. ...
    (microsoft.public.sqlserver.tools)