Hi,
I had the same problem as you. The button where SQL are executed
didn't worked on iPad but was ok on iPhone. I noticed that iPad is
more sensitive to mistakes in the code than iPhone and others
smartphone (Android). Make sure that the SQL request is correct. If
you need that your request use data stored in a variable, store first
your request in a variable and only then use the variable in the
executeSQL function.
for example:
var request = 'UPDATE table SET row1=?, row2=? WHERE id=' + rowID +
';'; //concatenate the rowID for the WHERE clause
var data = [value1, value2];
db.transaction(
function(transaction) {
transaction.executeSql(request, data, refreshEntries(),
errorHandler);
}
);
for a insert statement replace the variable request by using: var
request = 'INSERT INTO table (rowID, row1, row2) VALUES
(generateID(), ?, ?);';
hope this will help to resolve your problem...
> > I haven't tried it on iOS 4.x, but on iOS 3.2.2 on theiPad, creating web sql databases is fine.
> > This has nothing to do with phonegap btw...
>
> > On 2010-10-04, at 6:38 PM, George C Brackett wrote:
>
> > > I've discovered that my app, which uses the SQLite database, is able
> > > to create a database on iPhone/iPad, but it cannot insert data into
> > > the database on theiPadwhile it does so just fine on the iPhone. I
> > > get the same results using iOS 4.1 and its corresponding XCode app, as
> > > well as the new iOS 4.2 beta and its corresponding XCode app. I get
> > > the same results in the simulator(s) as well as on a newly-purchased
> > >iPaddevice.
>
> > > Anyone else have this problem? Does PhoneGap support database
> > > manipulation on theiPad?
>
> > > On Oct 4, 8:21 am, George C Brackett <
georgecbrack...@gmail.com>
> > > wrote:
> > >> Right. I'm planning to reformat the app eventually as a full-screen
> > >>iPadapp, but I want to release it now as just an iPhone/iPod Touch
> > >> app. The review requirement that it run anyway on theiPadin an
> > >> iPhone display format took me by surprise. Any idea why a control
> > >> would be non-functional on theiPadwhen it's always been functional
> > >> on the iPhone?
>
> > >> On Oct 4, 5:33 am, Giacomo Balli <
giacomoba...@gmail.com> wrote:
>
> > >>> I believe there is a distinction that has to be made. One thing is an
> > >>> iphone app running onipadand another one is a universal app. odds
> > >>> are you're fine in the first case, in the second you will have to
> > >>> revise most of the app's visual layout.
>
> > >>> On Oct 4, 3:13 am, George C Brackett <
georgecbrack...@gmail.com>
> > >>> wrote:
>
> > >>>> From the Apple review guidelines:
>
> > >>>> "iPhone apps must also run oniPadwithout modification, at iPhone
> > >>>> resolution, and at 2X iPhone 3GS resolution."
>
> > >>>> My almost-finished-really(!) iPhone/iPod Touch app does run in the
> > >>>>iPadsimulator under iOS 3.2 (it is written for iOS 4.1), displaying a
> > >>>> main screen and an image-loading screen in both orientations, but two
> > >>>> crucial controls, one a standard jQTouch chevron list element, and one
> > >>>> a large image button, do not work. Both involve $
> > >>>> (selector).click( function() {}); calls. (There may be other non-
> > >>>> functional controls, but I can't get to them.) This occurs in both 1x
> > >>>> and 2x mode.
>
> > >>>> If there are little gotchas in making an iPhone app run in full and
> > >>>> half size on theiPad, could someone point me toward the reference(s)?