SQL Delete Syntax for using MS Access with JDBC-ODBC Bridge Driver

SQL Delete Syntax for using MS Access with JDBC-ODBC Bridge Driver

Post by Brian Green » Mon, 06 Apr 1998 05:00:00



Hello there,

I'm doing a college project which involves using Java and Databases.

I'm using Postgres and Java as my main development platform. I also want
to be able to port it to other platforms. I pretty much successfully got
MS Access '97 working with the Java classes. I have come across a
problem:

When deleting records from a table the DELETE SQL call accepts no field
arguments i.e.:
DELETE FROM <table_name> WHERE <conditions>

But MS Access and the ODBC Driver (Standard Win 95/NT Driver) won't let
me delete any records without specifying a field argument:
DELETE * FROM <table_name> WHERE <conditions>

I need to include an asterisk, or the field names of the record to be
able to delete the record from the Access database- but this then won't
work Postgres.

I'm stuck :( - so any help would really be appreciated .

Thanks a million,
Take care,
Brian.

 
 
 

SQL Delete Syntax for using MS Access with JDBC-ODBC Bridge Driver

Post by confus » Wed, 08 Apr 1998 04:00:00



Quote:>But MS Access and the ODBC Driver (Standard Win 95/NT Driver) won't let
>me delete any records without specifying a field argument:
>DELETE * FROM <table_name> WHERE <conditions>
>I need to include an asterisk, or the field names of the record to be
>able to delete the record from the Access database- but this then won't
>work Postgres.
>I'm stuck :( - so any help would really be appreciated .

Brian, you don't need the asterik for Access.  "DELETE FROM tname
WHERE condition"  works just fine.  

confused

 
 
 

1. invalid descriptor index with MS SQL server, ODBC driver and JDBC-ODBC Bridge

Hi,

I have been developing Java-based solutions with MS SQL server, ODBC driver
for MSSQL and JDBC-ODBC bridge. There is one especially annoying 'feature'
for which I'd hope to find an elegant workaround. Let's
suppose I have a table MyData with columns AA,BB,CC,DD.
I then do:

ResultSet rs = javaConnectionObject.executeQuery("select AA,BB,CC,DD from
MyData");
rs.readString("AA");
rs.readString("CC");
rs.readString("BB"); // here I get an java.sql.Exception: Invalid descriptor
index

This is most obviously due to the fact that the 'cursor' has moved past
column BB when column CC is read and it's unable to go back. This is very
annoying since I have huge queries with 40+ columns which I want to process
as efficiently as possible in my Java code. Of course, I could read them all
in specified order and store the values to local variables but that would be
awful waste of time. Any suggestions how to do this elegantly? Thanks.

++Jarkko

2. UK Ingres User Conference

3. JDBC-ODBC Bridge Driver problem with MS ODBC SQL Server

4. Help Moving All Databases

5. jdbc-odbc bridge: and active hstmt using SQL Server ODBC Driver

6. Two "count" in the same querry?

7. newbee Jdbc-Odbc bridge driver with MS-Access

8. FPW26 - COM ports

9. Remote url to MS Access using JDBC-ODBC bridge

10. JDBC Driver for MS Access (Not JDBC-ODBC Driver)

11. Accessing a MS SQL database with JDBC/ODBC bridge

12. Accessing MS Access on a server with ODBC JDBC Bridge

13. Reading from MS Excel with JDBC-ODBC Bridge Driver