H2 ODBC access from classic asp

471 views
Skip to first unread message

de Milns

unread,
May 9, 2010, 5:01:07 PM5/9/10
to H2 Database
I am new to H2 and would like to do a connect from classic asp to an
H2 database
can anyone suggest what I need - I have installed PsqlODBC and the H2
drivers from
http://www.h2database.com/html/main.html
My equivalent statements for a SQLite database are
Set conn=Server.CreateObject("ADODB.Connection")
connOpen = "Driver={SQLite ODBC Driver};Database=" & DataPath &
Database
on error resume next
conn.Open connOpen
I would appreciate to get going
Thanks
Dennis

--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To post to this group, send email to h2-da...@googlegroups.com.
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.

Sylvain

unread,
May 9, 2010, 8:49:14 PM5/9/10
to H2 Database
Hi,

Check out the ODBC section here http://www.h2database.com/html/advanced.html#odbc_driver.

You should be able to connect the H2 database by specifying the
postgre sql driver. I managed to access a H2 database from a python
script using python odbc module.

Sylvain.


On 9 mai, 17:01, de Milns <den...@milns.net> wrote:
> I am new to H2 and would like to do a connect from classic asp to an
> H2 database
> can anyone suggest what I need - I have installed PsqlODBC and the H2
> drivers fromhttp://www.h2database.com/html/main.html

de Milns

unread,
May 10, 2010, 6:01:14 PM5/10/10
to H2 Database
Thanks for your input - I have tried to follow the instruction given
in the H2 documentation but I have had sevveral problems
I installed PsqlODBC
I ran the c:\windows\syswow64\odbcad32.exe and added the PostgreSQL
following the table given in the documentation.
When I tried a Configure to check the data entered I got the following
errors

The setup routines for the PostgreSQL ODBC driver could not be found.
Please reinstall the driver

then

Errors Found:

The specified DSN contains an archecture mismatch between the Driver
and Application.

I also tried the first Java command and this was the response

I tried to remove the entry and got the same errors as above.

java -cp h2*.jar org.h2.tools.Server
Exception in thread "main" java.lang.NoClassDefFoundError: org/h2/
tools/
Caused by: java.lang.ClassNotFoundException: org.h2.tools.Server
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.h2.tools.Server. Program will
exit.

To recover I had to do a system restore to a point before the first
install of PsqlODBC

What am I doing wrong.

On May 10, 1:49 am, Sylvain <punx...@gmail.com> wrote:
> Hi,
>
> Check out the ODBC section herehttp://www.h2database.com/html/advanced.html#odbc_driver.
> For more options, visit this group athttp://groups.google.com/group/h2-database?hl=en.- Hide quoted text -
>
> - Show quoted text -

Sylvain

unread,
May 10, 2010, 8:48:25 PM5/10/10
to H2 Database
For the error related to the java command, java was not able to find
the h2 jar files. You need to launch the command in the directory
where the jar files are or specify their correct location (-cp switch
of the command line).

I have no specific idea for the first error. Are you sure you have
installed the driver for the good architecture ?
> > For more options, visit this group athttp://groups.google.com/group/h2-database?hl=en.-Hide quoted text -
>
> > - Show quoted text -
>
> --
> You received this message because you are subscribed to the Google Groups "H2 Database" group.
> To post to this group, send email to h2-da...@googlegroups.com.
> To unsubscribe from this group, send email to h2-database...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages