0

sqlite3 データベースに値を挿入していますが、その際にいくつかの問題に直面しています。

クエリ:

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)")

それは私にこのエラーを与えます:

例外名: NS_ERROR_FAILURE 例外メッセージ: コンポーネントがエラー コードを返しました: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.createStatement]

この問題を解決するにはどうすればよいですか? いくつかのガイダンスが必要です...

4

1 に答える 1

2
"<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>"

列 vlaue 内に二重引用符を含むこれを挿入しようとしています。二重引用符は区切り文字と見なされます。したがって、1 つではなく 2 つの二重引用符を使用する必要があります。

例えば

"<div style='color:#FFF;font-family:Helvetica;'><div style=""font-family:Helvetica;"">..

等々

于 2012-11-16T04:52:50.240 に答える