Oh also, I should add, that I checked out the DB structure using the
little DB explorer guy that is available in the vanilla gears distro.

The SQLite DB looks identical as the one on the other platforms, just
without data ('cause of all the SQL errors, I assume)

Thanks!

E

On May 5, 2:22 pm, Evan Ruff <evan.r...@gmail.com> wrote:
> Hey guys,
>
> I've got a pretty heavy gears app the works great in IE, Firefox and
> Chrome; however, I'm getting some inconsistencies when running it on
> Android using Gears GWT API 1.2.0. Whenever I seem to run ANY query, I
> get a "Wrong number of SQL parameters" DatabaseException. Everything
> works perfectly in the other browsers.
>
> I'm debugging back to the client and my info is:
> Exception Message: Wrong number of SQL parameters.
> Method: selectUserByUserId
> Parameters: [ 1 ]
>
> Here is the method:
>
> private static final String SELECT_USER = "SELECT user_id, sessionId,
> name, email FROM user WHERE user_id = ?";
>
> public User selectUserByUserId( long userId )
> {
>         final String[] params = new String[] { Long.toString( userId ) };
>         try
>         {
>                 ResultSet rs = db.execute( SELECT_USER, params );
>                 for ( int i = 0; rs.isValidRow(); ++i, rs.next() )
>                 {
>                         User user = new User();
>                                 user.setId( rs.getFieldAsLong( 0 ) );
>                         user.setCurrentSessionId( rs.getFieldAsString( 1 ) );
>                         user.setName( rs.getFieldAsString( 2 ) );
>                         return user;
>                 }
>                 rs.close();
>         }
>         catch ( DatabaseException e )
>         {
>                 debugDBException( "selectUserByUserId", params, e );
>         }
>                 return null;
>
> }
>
> The debugDBException method just rolls everything up an submits it to
> the server.
>
> Has anone else had this sort of issue working with Gears on Android?
> I've tried the test 1.2 Gears LocalDB Test and it seems to fine. It
> looks like I'm trying to do a VERY similar thing and I'm really
> perplexed as to why it won't work.
>
> Thanks!
>
> Evan
>
> PS. Should I cross post this to the gears group?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to