I tried connecting to the h2 database after running
java -cp h2*.jar org.h2.tools.Server -tcp -tcpAllowOthers -ifNotExists -trace -trace -baseDir ./tempData
When I try to open a connection its successful
conn, err := sql.Open("h2", "h2://sa@localhost:9092/testdb1?mem=false&logging=info")
When I try conn.Ping() get the following error.
@line 50 in conn.go get the error SQL Error: Unknown which is then returned as
driver: bad connection
Commented the Ping() call and execute the following sql query.
ret, err := conn.Exec("CREATE TABLE test (id int not null, name varchar(100));")
get the following error.
Can't execute sentence: SQL Error: unknown: Can't read all data needed.
I would like to connect to h2 database, where the database is created in a data folder, instead of memory.
I checked out all the examples and they all seems to work only for in memory database.
Hi,
I tried connecting to the h2 database after running
java -cp h2*.jar org.h2.tools.Server -tcp -tcpAllowOthers -ifNotExists -trace -trace -baseDir ./tempData
When I try to open a connection its successful
conn, err := sql.Open("h2", "h2://sa@localhost:9092/testdb1?mem=false&logging=info")
When I try
conn.Ping()
get the following error.@line 50 in conn.go get the error
SQL Error: Unknown
which is then returned asdriver: bad connection
Commented the Ping() call and execute the following sql query.
ret, err := conn.Exec("CREATE TABLE test (id int not null, name varchar(100));")
get the following error. Can't execute sentence: SQL Error: unknown: Can't read all data needed.I would like to connect to h2 database, where the database is created in a data folder, instead of memory.
I checked out all the examples and they all seems to work only for in memory database.
Please can you suggest me how to fix this issue.
thanks Johnson