not implemented @ org.sqldroid.SQLDroidConnection (prepareStatement) line 295

145 views
Skip to first unread message

Dave

unread,
Nov 19, 2012, 8:14:20 AM11/19/12
to sqld...@googlegroups.com
Hi,

I tried the SQLDroid driver but it seems that some implementation is missing.

11-19 12:51:14.326: W/System.err(1831):  ********************* not implemented @ org.sqldroid.SQLDroidConnection (prepareStatement) line 295
11-19 12:51:14.434: E/AndroidRuntime(1831):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)

Jim Redman

unread,
Nov 19, 2012, 12:11:45 PM11/19/12
to sqld...@googlegroups.com, Dave
Dave,

I doubt that any JDBC driver is "complete" there are so many methods.

The method that is causing you problems seems to be:

public PreparedStatement prepareStatement(String sql, int resultSetType,
int resultSetConcurrency) throws SQLException {

In the case of that particular method we don't (yet?) have the concept
of resultSetType or Concurrency. The best that could be done easily is
simply implement it as:

public PreparedStatement prepareStatement(String sql, int resultSetType,
int resultSetConcurrency) throws SQLException {
return prepareStatement (sql );
}

If you can download the source and think that might work for you, give
it a try and let us know.

Thanks,

Jim
--
Jim Redman
(505) 662 5156 x85
http://www.ergotech.com

Dave

unread,
Nov 19, 2012, 8:30:33 PM11/19/12
to sqld...@googlegroups.com, Dave, jre...@ergotech.com
Yes, that worked, Thanks Jim

Do you also have a workaround for

11-20 01:01:31.075: V/SQLDRoid(1327): new SqlDRoid prepared statement from org.sqldroid.SQLDroidConnection@412f1208
11-20 01:01:31.145: W/System.err(1327):  ********************* not implemented @ org.sqldroid.SQLDroidPreparedStatement (setMaxRows) line 483


in

  @Override
  public void setMaxRows(int max) throws SQLException {
    System.err.println(" ********************* not implemented @ "
        + DebugPrinter.getFileName() + " line "
        + DebugPrinter.getLineNumber());
  }



Op maandag 19 november 2012 18:11:47 UTC+1 schreef Jim Redman het volgende:

Jim Redman

unread,
Nov 19, 2012, 9:53:58 PM11/19/12
to Dave, sqld...@googlegroups.com
Dave,

If you look at the SQLDroidStatement class it actually has a (real)
implementation for this. It stores the max rows and then appends a
limit to the SQL in exec if the statement is a select statement:

String limitedSql = sql + (maxRows != null ? " LIMIT " + maxRows :
"");

You could do something similar in SQLDroidPreparedStatement. Since
(currently) the sql statement is not really prepared, you could just
append it, if necessary in executeQuery and in execute() within the "
if (isSelect) {" clause.

Jim
Reply all
Reply to author
Forward
0 new messages