Re: error 3128 in query

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



Try specifying a field or the entire set of fields in the SQL string.

DELETE A.*
FROM ...

DELETE A.[SomeField] FROM ...

You may also have to use the DISTINCTROW predicate as in

DELETE DISTINCTROW A.[SomeField] FROM ...

If you want to use T-SQL statement syntax, you might have to use pass-through queries.

Lavu wrote:
>
> I use an ACCESS 2003 front end to SQL server 2000.
>
> I am passsing a simple SQL statement
>
> SQLText1 = "Delete A from dbo_tblBook_inventory A ,dbo_tblrhd_inventory b "
> & _
> " where A.drive_num = b.drive_num And b.date_verified Is
> Not Null"
>
> DoCmd.RunSQL SQLText1
>
> This gives me the error 3128 - Specify the table containing the records that
> you want to delete.
>
> But the same statement works when I try it in SQL server's Query Analyzer.
>
> I also tried changing the query to
>
> Delete A from dbo_tblBook_inventory A inner join dbo_tblrhd_inventory B on
> A.drive_num = B.drive_num where B.date_verified Is Not Null
>
> but the same error 3128 occurs from ACCESS and works fine directly on SQL
> server.
>
> Any help will be appreciated.
>
> Ps: I posted this in the DAO,ADO group also . Apologies for those who read
> both and find duplicate posting.
.



Relevant Pages

  • Re: SQL Server problem on sbs 2K3 + wss sp2
    ... SQL Query Analyzer ... How can I tell if SQL Server is running, ...
    (microsoft.public.windows.server.sbs)
  • Re: Query Analyzer Debuging
    ... > I am connecting to a SQL 2k Server SP3 on a different machine on the ... > network using SQL Query Analyzer 8.00.760. ... only the Query Analyzer. ... both on SQL Server and on the workstation. ...
    (microsoft.public.sqlserver.tools)
  • Re: SQL Berechtigungen
    ... In der Programm Gruppe SQL Servers findest Du den Query Analyzer. ... dann zum jeweiligen SQL Server verbinden. ... Wähle die Datenbank und mache ein SELECT auf ...
    (microsoft.public.de.access.clientserver)
  • RE: sql script
    ... I'm assuming you are referring to executing queries within the SQL Server CE Query Analyzer. ... | Thread-Topic: sql script ...
    (microsoft.public.sqlserver.ce)
  • Re: SQL Enterprise Manager
    ... Thouh I can query using Query Analyzer but Enterprise Manager ... Rest of my team is having no problem accessing SQL Server. ...
    (microsoft.public.sqlserver.tools)