Writing java.sql.Timestamp to MS Access 97.

Writing java.sql.Timestamp to MS Access 97.

Post by Gary Woodbridg » Tue, 10 Aug 1999 04:00:00



I get the following when I try to write a Timestamp type to a MS Access
97 DB using the ODBC Microsoft Access 97 Drvier:

Syntax error <missing operator> in query expression '1999-08-09
11:51:00.0'

How do I format  the insert statment to write the timestamp?

Thanks,
Gary

 
 
 

Writing java.sql.Timestamp to MS Access 97.

Post by Gary Woodbridg » Wed, 11 Aug 1999 04:00:00


Bill,

Thanks for the reply.

I tried the hash marks and got a slightly different error.  But, I did
figure it out.

After loading the latest version of the ODBC drivers and spending many
hours
looking around the MSWebPage, I found the syntax for a timestamp is the
following:

        {ts '1999-08-09 11:51:00.0'}

Thanks again
Gary


> | I get the following when I try to write a Timestamp type to a MS
> Access
> | 97 DB using the ODBC Microsoft Access 97 Drvier:
> |
> | Syntax error <missing operator> in query expression '1999-08-09
> | 11:51:00.0'
> |
> | How do I format  the insert statment to write the timestamp?

>     Access (or really, the Jet engine) is a lousy implementation of SQL.
> The syntax Jet expects is,

>         ... #1999-08-09 11:51:00.0#

> (i.e., hash marks instead of quotes).

>     According to the SQL standard, that should be,

>         ... TIMESTAMP ''1999-08-09 11:51:00.0'

>     (And on Oracle, it's yet a third method,...)

>                                                 -- Bill K.


 
 
 

1. MS-Access 97 to SQL Server to MS-Access 97

Hi this is a thread from another news group that has not been
answered. Any ideas anyone?

Thank You, Thank You...you hit it right on the money. It seems SQL
import/export converted all my MS-Access memo fields to the SQL ntext
data type. Does SQL Server have a comparable memo field type? If not
how do people get around the memo field requirement? Create text field
large enough for the average requirement?

Thanks Again

On Thu, 17 Jun 1999 16:40:30 +0400, Alexey Dolganov

2. HELP!! Oracle 8.0.4.4.0 Listener Process on Unixware 7.1

3. Help Access 95 , Visual Basic 4.0

4. MS Access 97 SQL to MS SQL SQL SQL SQL

5. Distributed sp with Remote Server

6. Help needed on writing/updating MS Access 97

7. C-ISAM & ODBC - Reconcilable?

8. Java & MS Access 97

9. Set up ODBC on Windows 2000 for Connecting Java 2 with MS Access 97

10. How to migrate from MS Access 97 to MS SQL server 6.5

11. Upsizing MS Access 97 to MS SQL Server

12. Calling MS ACCESS 97 Cross-Tab Query from MS SQL 6.5