unable to figure out this sqlexception

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

unable to figure out this sqlexception

Postby shrikant » Mon Jun 23, 2008 12:27 pm

Hi guys.
Im trying to insert three strings stored in title, url and Desc into a database whose name is in MY_DATABASE_TABLE1. Im using the following, but it generates an SQLException..
myDB.execSQL("INSERT INTO " + MY_DATABASE_TABLE1 + " (title,url,description)" + " VALUES ("+title + "," + url + ","+Desc+ ");");


can some one plz tell me where i'm going wrong.. i also tried adding single quotes before n after the variable names. didnt work :( Here's that code too..

myDB.execSQL("INSERT INTO " + MY_DATABASE_TABLE1 + " (title,url,description)" + " VALUES ('"+title + "','" + url + "','"+Desc+ "');");


Plz help, thanks...
shrikant
Junior Developer
Junior Developer
 
Posts: 13
Joined: Fri Jun 13, 2008 5:53 am
Location: India

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests