h2 database - table not found

565 views
Skip to first unread message

Roberto

unread,
Feb 27, 2012, 5:05:14 AM2/27/12
to ra...@googlegroups.com
hi all

i'm a newbie of railo.
i'm trying to use h2 built in database engine.

1. i create the datasource
http://imgur.com/delete/la04KO7Xznrc5yl

2. datasource is verified
http://i.imgur.com/6Ra9z.jpg

3. railo creates files in property directory
http://i.imgur.com/Shd4K.jpg

4. with razorSQL i add table to my database
http://i.imgur.com/ZVHqy.jpg

but when a make select to table "logs" from database
(from razor works perfectly), i get this error:

===
Table "LOGS" not found; SQL statement:
SELECT * FROM LOGS;
[42102-133]
SQL
SELECT * FROM LOGS;
DatabaseName H2
DatabaseVersion 1.2.133 (2010-04-10)
DriverName H2 JDBC Driver
DriverVersion 1.2.133 (2010-04-10)
Datasource spintranet
===

i'm trying to:
- update h2.jar driver
- another name of table
without solution

i've got an identically problem with HSQLDB

can you help me?

many thanks!

AJ Mercer

unread,
Feb 28, 2012, 7:33:34 AM2/28/12
to ra...@googlegroups.com

Maybe try sa.LOGS

Are you using the same casing for the table name?

Mike Johnson

unread,
Feb 28, 2012, 9:44:09 AM2/28/12
to ra...@googlegroups.com
I have never used razorSql before, but I have used the H2 database a lot.

I would make the table in Railo and see how it shows up in the program

<cfquery name="qCreateTable" datasource="spintranet">
CREATE TABLE IF NOT EXISTS `logs` (
`event` VARCHAR_IGNORECASE(50) NULL DEFAULT '',
`createDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`username` VARCHAR_IGNORECASE(50) NULL DEFAULT '',
`type` VARCHAR_IGNORECASE(20) NULL DEFAULT '',
`customerID` int(11) DEFAULT NULL,
`employeeID` int(11) DEFAULT NULL,
`id` int(1) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
)
</cfquery>

Reply all
Reply to author
Forward
0 new messages