开发者

Problem while performing Insert statement

HI.. I have a database created and having a table inside it.. now when i am inserting a value in my table it doesnot work... And please tell me how to see the error if occurs in the eclipse plug in . I am very new to blackberry. now the snippet code for inserting the value is

Database d;

URI myUri = URI.create("file:///SDCard/Databases/SQLit开发者_Python百科e_Guide/", "Mynewdatabase1.db"); d= DatabaseFactory.create(myUri); d.close; Statement s1=d.createStatement("INSERT INTO People(Name,Age)VALUES ('uttam',23)"); s1.prepare(); s1.execute(); s1.close(); d.close();


You're closing the data base before calling createStatement? That isn't going to work. Is this the actual code, because the first you're missing the parens on the first call: d.close;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜