I am inserting some value into my sqlite3 database but facing some problems in doing so.
Query:
INSERT OR REPLACE INTO TECHNICALINFO (PARENTID, PCREATEDBY, PDATECREATED, PDATEMODIFIED, PDESCRIPTION, TECHINFOID, PLAYOUTTYPE, PMEDIAFILE, PMEDIAFILETHUMB, PMEDIAID, PNAME, PPUBLISHDATEEND, PPUBLISHDATESTART, PSTATUS, PTITLE1, PTITLE2, TYREBRANDID, RELATEDCRITERIA, MILEAGEMINVALUE, MILEAGEFREQUENCY, MILEAGETOLERANCE, AGEVEHICLEMINVALUE, AGEVEHICLEFREQUENCY, AGEVEHICLETOLERANCE, ISPUBLISHED, APPROVEDBY, DATEAPPROVED, MEDIUMID, ISAMENDED,FILESIZE,STATUS) VALUES ("0","1","2012-05-02 06:57:27","2012-05-02 06:57:27","<div style='color:#FFF;font-family:Helvetica;'><div style="font-family:Helvetica;"><div style="font-family: Helvetica;"><div style="font-family: Helvetica;"><p><span style="font-size: 18px;"><strong>Brake System</strong></span><br /><span style="font-size: 18px;">Features the Component Layout for the Brake System.</span><br /><span style="font-size: 18px;">Description on individual function of each component.</span></p><p><span style="font-size: 18px;"><strong>ABS (anti-lock brake system)</strong></span><br /><span style="font-size: 18px;">Features the Component Layout for the ABS (anti-lock brake system).</span><br /><span style="font-size: 18px;">Description on individual function of each component.</span></p><p><span style="font-size: 18px;"><strong>ABS with EDB (electronic brake force distribution)</strong></span><br /><span style="font-size: 18px;">Features the Component Layout for the ABS with EDB (electronic brake force distribution).</span></p><p><span style="font-size: 18px;">Description on individual function of each component.</span></p><p><span style="font-size: 18px;"><strong>VSC (vehicle stability control)</strong></span></p><p><span style="font-size: 18px;">Features the Component Layout for the VSC (vehicle stability control).</span><br /><span style="font-size: 18px;">Description on individual function of each component.</span></p><p><span style="font-size: 18px;"><strong>Brake Assist System</strong></span><br /><span style="font-size: 18px;">Features the Component Layout for the Brake Assist System.</span><br /><span style="font-size: 18px;">Description on individual function of each component.</span></p></div></div></div></div>","8","(null)","http://46.137.210.235/files/media/full/brake_system.png","http://46.137.210.235/files/media/thumb/brake_system-thumb.png","(null)","2. Brake System","2013-04-23 00:00:00","2012-04-23 00:00:00","2","2. Brake System","","(null)","(null)","(null)","(null)","(null)","(null)","(null)","(null)","YES","1","2012-04-23 10:14:04","439","0","(null)","(null)")
It gives me this error:
Exception Name: NS_ERROR_FAILURE
Exception Message: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.createStatement]
How do i solve this issue? Need some guidance…
You are trying to insert this which contains double quotes within the column vlaue. Double quotes are considered as delimitters. So you would have to use tow double quotes instead of one.
For example
and so on