Make your own free website on Tripod.com

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]

InstantDB: length limitation


Hi,
Please help me to solve this problem. I need to fix it urgently.

I have a very simple function: MY_FUNCTION()

File name: my_function.java

package org.enhydra.instantdb.db;

import org.enhydra.instantdb.db.SqlFunction;
import java.sql.*;

class my_function implements SqlFunction {
    public int checkParameters (int[] parameterTypes) throws SQLException {
        return TYPE_STRING;         // our return type
    }

    public void setSpecialValue(int type, Object value) {
    }

    public Object getSpecialValue (int type) throws SQLException {
        return null;
    }

    public Object evaluate(Object[] parameters) throws SQLException {
        return "0123456789012345678901234567890";        //string length =
31
    }
}

Run a SQL statement  SELECT MY_FUNCTION() myalias FROM AnyTable
I got an exception
java.sql.SQLException: java.sql.SQLException: Column myalias cannot accept
value
 0123456789012345678901234567890
        at org.enhydra.instantdb.db.SQLProg.execute(SQLProg.java:288)
        at
org.enhydra.instantdb.jdbc.idbStatement.execute(idbStatement.java:235
)
        at JDBCAppl.action(JDBCAppl.java:214)
        at java.awt.Component.handleEvent(Unknown Source)
        at JDBCAppl.handleEvent(JDBCAppl.java:270)

But if the return string from MY_FUNCTION() has length=30, e.g
012345678901234567890123456789, then everything's fine, there's no
exception.

Is there any way to set again the limit of string length to make it longer
than 30? Or any way to work around?

Thanks,
Huy

-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.