Hi

You need to remove the backslash.

Regards Thomas
Am 10.10.2012 03:33 schrieb "Ewald" <[email protected]>:

> Hi.
>
> I've got a similar problem and the correct escaping has certainly helped.
> I want to add DB_CLOSE_DELAY but I keep running into a new issue :
>
> Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement
> "DB_CLOSE_DELAY[*]=-1"; expected "DELETE, DROP, DECLARE, DEALLOCATE, {";
> SQL statement:
> DB_CLOSE_DELAY=-1 [42001-161]
>
>
> My XML string is
>  <connection-url>jdbc:h2:mem:memtestdb;INIT=CREATE SCHEMA IF NOT EXISTS
> AUD\;DB_CLOSE_DELAY=-1</connection-url>
>
> I've got no idea how to resolve this - can someone by any chance spot what
> I'm doing wrong?
>
> Thank you.
>
> Regards,
> Ewald
>
> On Friday, 7 September 2012 22:29:36 UTC+2, Thomas Mueller wrote:
>>
>> Hi,
>>
>> I guess it's an escaping problem. How did you configure Spring/Hibernate
>> (properties file, XML file, Java program)?
>>
>> Regards,
>> Thomas
>>
>> On Fri, Sep 7, 2012 at 4:54 PM, Ann-Marie Russell <[email protected]>wrote:
>>
>>> Sorry to jump on an old thread, but I'm having a hard time finding any
>>> more recent information.  I'm trying to run an h2 db, in memory, via
>>> spring/hibernate.
>>>
>>> URL: jdbc:h2:mem:test_db;INIT=**create schema if not exists
>>> test_db\;runscript from '~\cpfdb_1_2_ddl.sql';DB_**
>>> CLOSE_DELAY=-1;MODE=MYSQL
>>> Driver: org.h2.Driver
>>>
>>> When I run my unit test, I continue to receive the invalid url format
>>> error.  However, when I simply run the jar, which opens a browser utility
>>> and enter in the url, it has no problems with it.  So I'm completely
>>> stumped and hoping someone might be able to help.
>>>
>>> thanks -
>>> AMR
>>>
>>>
>>> On Saturday, November 26, 2011 4:19:31 AM UTC-6, Thomas Mueller wrote:
>>>>
>>>> Hi,
>>>>
>>>> This question is already answered on StackOverflow: http://**stackove**
>>>> rflow.com/questions/**8237767/**h2-db-runscript-error<http://stackoverflow.com/questions/8237767/h2-db-runscript-error>
>>>>
>>>> The problem is the escaping: replace "\\;" with "\;"
>>>>
>>>>    <property name="url" value="jdbc:h2:mem:test_db;**INI**T=CREATE
>>>> SCHEMA
>>>> IF NOT EXISTS test_db\;RUNSCRIPT FROM '~/sql/
>>>> populate.sql';DB_CLOSE_DELAY=-****1" />
>>>>
>>>> Regards,
>>>> Thomas
>>>>
>>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "H2 Database" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/h2-database/-/O9ZkKqIE3jMJ<https://groups.google.com/d/msg/h2-database/-/O9ZkKqIE3jMJ>
>>> **.
>>>
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to h2-database...@**
>>> googlegroups.com.
>>> For more options, visit this group at http://groups.google.com/**
>>> group/h2-database?hl=en<http://groups.google.com/group/h2-database?hl=en>
>>> .
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/h2-database/-/mEfnyp-cS48J.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to