Yes, I almost forgot about that. DSN-less. Actually it is due to the fact that I never fully understood the differences between ODBC (always thought that it had to have datasource), and confused DSN, DSN-less as though they were separate constructs, and mixed up OLEDB along with the mix.
Now that you have cleared up the confusion, I now see that DSN and DSN- less are different modes of ODBC. Funny, how I learned COM based ideas from a Java group, instead of from VB6 world, from where I originally came from. Thanks again. I can now research this out. Paluee On Mar 22, 8:15 pm, Wildam Martin <[email protected]> wrote: > On Tue, Mar 23, 2010 at 01:02, Paluee <[email protected]> wrote: > > So I guess there is no other way than ODBC way. > > I am trying to avoid that. I wish to just write code and not have to > > do any kind of configuring, like setting up a datasource in the > > windows controlPanel/Administrative Tools. > > If this is the only reason why you want to avoid ODBC, you can be > helped. An ODBC connection string can be defined also DSN-less. For H2 > in particular you might need to test a little. As I know from other > databases - at least for DSN less connections it is important to > specify the parameters also in the correct order as the database > driver wishes. > > You need to specify all needed parameters in the connection string and > you must have a "DSN=;..." at the beginning (DSN being empty). > > Here is an example for MS SQL Server without the need of configuring a DSN: > ODBC;DSN=;SERVER=localhost;DATABASE=TEST;UID=sa;PWD=nothing;DRIVER={SQL > Server} > > For H2 it is maybe "ODBC;Data Source=;..." according > tohttp://www.h2database.com/html/advanced.html#odbc_driver- I did not > try this, so I can't tell you the exact valid string. > > -- > Martin Wildam -- 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.
