Provider=Microsoft.Jet.OLEDB.4.0 vs 3.51 
Author Message
 Provider=Microsoft.Jet.OLEDB.4.0 vs 3.51

Some help please! I am using an Access 97 database
    Set cnCODE = New ADODB.Connection
    strTemp = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security
Info=False;Data Source=" & "C:\Current.mdb"
    cnCODE.Open strTemp
    ....
    cnCODE.Execute "DELETE * FROM Container WHERE PrintOrder=" &
Str(selectedI)
When I reach this line I get "Syntax error in FROM clause"

However, the following works perfectly
    Set cnCODE = New ADODB.Connection
    strTemp = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security
Info=False;Data Source=" & "C:\Current.mdb"
    cnCODE.Open strTemp
    ....
    cnCODE.Execute "DELETE * FROM Container WHERE PrintOrder=" &
Str(selectedI)

My client's machine has Access 2000 and will not allow the connection to my
Access 97 databases with Microsoft.Jet.OLEDB.3.51.
--
Bill Ringbom



Thu, 06 Nov 2003 02:28:13 GMT  
 Provider=Microsoft.Jet.OLEDB.4.0 vs 3.51

Quote:
>     cnCODE.Execute "DELETE * FROM Container WHERE PrintOrder=" &

Bill,
Your SQL DELETE statement doesn't look correct.  There is no "*" after the
keyword DELETE

Try this:
DELETE FROM table-name [WHERE search-condition]
http://msdn.microsoft.com/library/psdk/dasdk/odch6rcj.htm

--

Thanks,
Carl Prothman
Microsoft Visual Basic MVP
http://www.able-consulting.com



Thu, 06 Nov 2003 05:08:17 GMT  
 Provider=Microsoft.Jet.OLEDB.4.0 vs 3.51
Bill, Carl is correct. Access2000, SQL and Oracle do not allow the asterisks
in a DELETE statement.

--

Kent Prokopy


Quote:

> >     cnCODE.Execute "DELETE * FROM Container WHERE PrintOrder=" &

> Bill,
> Your SQL DELETE statement doesn't look correct.  There is no "*" after the
> keyword DELETE

> Try this:
> DELETE FROM table-name [WHERE search-condition]
> http://msdn.microsoft.com/library/psdk/dasdk/odch6rcj.htm

> --

> Thanks,
> Carl Prothman
> Microsoft Visual Basic MVP
> http://www.able-consulting.com



Thu, 06 Nov 2003 06:56:40 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Microsoft Jet OLEDB Provider 3.51: Does it support parameterized querys

2. Replace OLEDB provider Jet 3.51 with Jet 4.0

3. Problem using OLEDB provider for Jet 3.51

4. Microsoft Jet 3.51 Ole Db Provider, where is?

5. Jet 3.51 vs Jet 4.0 vs MSDE

6. Jet DB Performance (Jet 3.51 vs. Jet 4.0)

7. Microsoft Jet 4.0 vs 3.51

8. Microsoft.Jet.OLEDB.3.51 provider not registered

9. Microsoft.Jet.OLEDB.4.0 OLE DB provider

10. Updating child recordsets using the Microsoft.Jet.OLEDB.3.51 provider

11. Microsoft.Jet.OLEDB.4.0 Provider not working with Access 97 MDB

12. Command.Execute with parameter works with ODBC provider, fails with Microsoft.Jet.OLEDB.4.0

 

 
Powered by phpBB® Forum Software