On MSSQL also appeared the same error. If you have DATE fields on the
DAO to be made persistent, change the date field attributes to
java.sql.Timestamp and do the same on the OJB repository,

Pedro Salgado

> hi raghu,
>
> welcome back !
>
> Raghuram Rajah wrote:
>
>> Christian,
>>
>> The generated statement is a PreparedStatement. PreparedStatements are
>> parameterized and are far more efficient than NonPreparedStatements.
>> The "?" refers to a parameter.
>>
>> As far as the exception is concerned, can you translate that to
>> English?
>
> this is a syntax error in the insert statement.
>
> christian: does the insert work when you replace the ? with the desired
> values ? i ask because i see columns with suspicious names: name,
> timestamp
>
> jakob
>
>>
>> Thanks,
>>  Raghu.
>>
>> -----Original Message-----
>> From: Christian Eugster [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, March 18, 2004 1:04 AM
>> To: OJB Users List
>> Subject: ms access: sqlexception
>>
>>
>> Hi there
>>
>> unfortunately i have to connect my application for a customer to an
>> access database. I succeeded to connect but i always get exceptions
>> while inserting or updating rows as follows:
>>
>> INTERESTING: the insertstatement shows instead of values just '?' what
>> could this mean? Has anybody any idea?
>>
>> Thank you!
>>
>> Christian
>>
>> [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] DEBUG:
>> executeInsert : [EMAIL PROTECTED]
>> [org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl] DEBUG:
>> SQL:INSERT INTO pos_product_group
>> (id,timestamp,deleted,galileo_id,default_tax_id,shortname,name,quantity,pric
>> e,opt_code,account,is_expense) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)
>> [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] DEBUG:
>> executeInsert: [EMAIL PROTECTED]
>> [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException
>> during the execution of the insert (for a
>> ch.eugster.pos.db.ProductGroup): [Microsoft][ODBC Microsoft Access
>> Driver] Syntaxfehler in der INSERT INTO-Anweisung.
>> [Microsoft][ODBC Microsoft Access Driver] Syntaxfehler in der INSERT
>> INTO-Anweisung.
>> java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]
>> Syntaxfehler in der INSERT INTO-Anweisung.
>>      at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
>>      at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
>>      at sun.jdbc.odbc.JdbcOdbc.SQLExecute(Unknown Source)
>>      at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(Unknown Source) at
>> sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeUpdate(Unknown
>> Source)
>>      at
>> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(Unknown
>> Source)
>>      at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(Unknown
>> Source)
>>      at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown
>> Source)
>>      at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown
>> Source)
>>      at
>> org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
>> Source)
>>      at
>> org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
>> Source)
>>      at ch.eugster.pos.db.Table.store(Table.java:98)
>>      at ch.eugster.pos.db.Table.store(Table.java:194)
>>      at
>> ch.eugster.pos.admin.model.PersistentDBStore.save(PersistentDBStore.java:48)
>>      at
>> ch.eugster.pos.admin.gui.container.SashForm.save(SashForm.java:543)
>>      at
>> ch.eugster.pos.admin.MainWindow.buttonPressed(MainWindow.java:998)
>>      at
>> ch.eugster.pos.admin.MainWindow$5.widgetSelected(MainWindow.java:838)
>>      at
>> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
>>      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
>>      at
>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
>>      at
>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
>>      at org.eclipse.jface.window.Window.runEventLoop(Window.java:583) at
>> org.eclipse.jface.window.Window.open(Window.java:563)
>>      at ch.eugster.pos.admin.MainWindow.getInstance(MainWindow.java:1116)
>> at ch.eugster.pos.admin.App.<init>(App.java:71)
>>      at ch.eugster.pos.admin.App.main(App.java:130)
>> 17.03.2004 23:27:20 ch.eugster.pos.db.Table describeError
>> SCHWERWIEGEND: java.sql.SQLException: [Microsoft][ODBC Microsoft
>> Access Driver] Syntaxfehler in der INSERT INTO-Anweisung.
>> 17.03.2004 23:27:20 ch.eugster.pos.db.DBResult log
>> SCHWERWIEGEND: 4:
>> 17.03.2004 23:27:20 ch.eugster.pos.db.DBResult log
>> SCHWERWIEGEND: 37000: [Microsoft][ODBC Microsoft Access Driver]
>> Syntaxfehler in der INSERT INTO-Anweisung.
>> 17.03.2004 23:27:20 ch.eugster.pos.db.Table describeError
>> SCHWERWIEGEND: [Microsoft][ODBC Microsoft Access Driver] Syntaxfehler
>> in der INSERT INTO-Anweisung.
>> [org.apache.ojb.broker.accesslayer.StatementManager] DEBUG:
>> closeResources was called
>> [org.apache.ojb.broker.accesslayer.ConnectionManagerImpl] INFO:
>> Rollback was called, do rollback on current connection
>> [EMAIL PROTECTED]
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to