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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---