regarding Google Gears

4 views
Skip to first unread message

Creeds

unread,
Jul 7, 2008, 7:26:50 AM7/7/08
to Google users
Hello ,
I am very new with google gears, i have used some gears application
like google reader and also Remember the Milk but still i am not able
to understand clearly,
Using google gears, i have made a small type of insert & select
query .
I am successful in insertin the value in SQlite databse and able to
retrieve dat easily with javascript but now i want to pass that value
obtained thru javascript to JSP pages so that i can update my Web
server. this is just a test to make application offline, so that i
post to a SQlite database and latr resynchronize to Web Server,
how to procced,

All sorts of Suggestion and help is highly appreciated,

a code snippet----------------------------------------------------

<script type="text/javascript" src="gears_init.js"></script>
<script type="text/javascript">
var db = google.gears.factory.create('beta.database');
db.open('database-demo');
var rs = db.execute('select * from ntech');
while (rs.isValidRow()) {
alert(rs.field(0)+" "+rs.field(1));
var name=rs.field(0);
var address= rs.field(1);
---------------------- for fetching data from
javascript.....................

now for posting that value in jsp pages.

<%
Connection conn = null;
ResultSet rs = null;
String result="";

PreparedStatement stmt = null;


try {
conn = Utilities.getDbConnection();
stmt = conn.prepareStatement("insert into test
(name,address) values rs.field(0),rs.field(1)) ");

here, how can i Pass the value obtained thru' scripts like rs.field(0)
and rs.field(1)


with regards,
Creeds
Reply all
Reply to author
Forward
0 new messages