Re: Updating MDB via OpenQuery

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

From: Jeff Dillon (jeff_at_removeemergencyreporting.com)
Date: 10/28/04


Date: Thu, 28 Oct 2004 10:56:16 -0700

Now, how do I drop a table?

I've tried select * from OPENQUERY(ACCESS, 'drop table TestTable')

which returns:

Error: OLE DB Provider Microsoft.Jet.OLEDB.4.0 indicates that the object has
no columns

then I tried

I've tried select * from OPENQUERY(ACCESS, 'drop table TestTable;select 1')

but says

"Syntax error in DROP TABLE statement"

Any ideas?

thx

Jeff

"Jesse Beveridge" <jesse@nospam.nospam> wrote in message
news:OIGv8DRvEHA.1296@TK2MSFTNGP10.phx.gbl...
> Try:
> insert openquery(ACCESS, 'select * from accounts where 1=2')
> select * from Accounts_View
>
> This assumes that Accounts_View has the same column order that the access
> table has, otherwise you should provide a column list.
>
> -- Jesse
>
>
> "Jeff Dillon" <jeff@removeemergencyreporting.com> wrote in message
> news:OpUlY5QvEHA.4072@TK2MSFTNGP15.phx.gbl...
> > I've created a linked server named ACCESS in my local instance of
SQL2000.
> >
> > This works:
> >
> > select * from openquery(ACCESS, 'select * from accounts')
> >
> > Now, I would like to insert all records from the SQL view
'Accounts_View'
> > into the corresponding Access table 'Accounts'
> >
> > What would the appropriate openquery syntax be?
> >
> > thx
> >
> > Jeff
> >
> >
>
>



Relevant Pages

  • Re: Updating MDB via OpenQuery
    ... > I've created a linked server named ACCESS in my local instance of SQL2000. ...
    (microsoft.public.sqlserver.programming)
  • Re: vpn cant access shares
    ... System error 5 has occured. ... OEx allows ...
    (microsoft.public.windows.server.networking)
  • Re: IIf function
    ... Please post exactly what you used that is getting the syntax error. ... Access Security: www.ltcomputerdesigns.com/Security.htm ... Jeff Conrad's Access Junkie List: ... "Lynn Trapp" wrote: ...
    (microsoft.public.access.reports)
  • Re: Need Query to Yield Results of Latest Record Input in Each Gro
    ... Jeff, thx for your reply. ... Please describe your data structure, and please post the SQL statement your ...
    (microsoft.public.access.queries)
  • Re: Function to check NULL and Empty String
    ... I thought I was missing something simple. ... Jeff ... > IS NOT NULL isn't needed in the code you posted anyway (NULLs will be ...
    (microsoft.public.sqlserver.programming)