InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InstantDB: InstantDB and CocoBaseFreeJDBC


 
Hey Juergen

this how I was connecting to InstantDB using CocoBase:

I just point my classpath to the cocobase classes, and include the latest Instant db jar.

here is some example code I used:

<snip>

            myBase = CocoDriver.getCocoDriver( section.getString("classpath"),
                                               section.getString("driver"),
                                               section.getString("connect"),
                                               section.getString("user"),
                                               section.getString("password"));
            //to see output
            myBase.setDebug(true);
            if(myBase.connect() == -1) {
                System.out.println("Failed connect!");
            }

</snip>
 

Then to use, for example for looking up a person by name:

<snip>
 

        try {
 
            Person person = new Person();
            person.setLogin(username);
            Vector foundPerson = getCocoDriver().selectAll(person);
 
                return (Person)foundPerson.firstElement();
 
 
        } catch(Exception ex) {
 
 
        }
 

</snip>
 
 

Hope this helps,

joe
 
 
 
 

Juergen Roeder wrote:

Hi!Is anybody out there working with CocoBaseFreeJDBC?I'm working with InstantDB 3.20 beta2 and CocoBaseFreeJDBC 3.01. If I try to open a new db connection with the CocoAdmin Tool I get the following error message: "Bad JDBC ClassName! CocoBase Free only works with InstantDB or SimpleText!" It seems that CocoBaseFreeJDBC is shipped with InstantDB v2.20 and all the properties files in the cocobase demos subdirectory rely on version 2.20 of InstantDB.I substituted all InstantDB v2.20 jars shipped with cocobase by InstantDB v3.20 beta2 jars and edited all the necessary properties files to work with InstantDB v3.20 beta2. I set idb.jar properly in the CLASSPATH too. Any idea what's going wrong? Thanks for help in advance!Jürgen