데이터가 없습니다. 동일한 데이터베이스에서 다른 테이블의 업데이트를 실행해도 문제가 없었으므로 연결이 잘된 것 같습니다. 나는 테이블에 삽입을 실행할 때, 나는 모든 데이터가 삽입받지 못했습니다 및 에러/예외가 발생하지 않습니다되고있다. 그래서 무슨 일이 일어나고 있는지 혼란스러워. 여기 내 테이블 구조입니다SQL 인서트 에러없이 아직 표 I 티탄 모바일 sqlite가 사용하고
CREATE TABLE events (
gCal_uid VARCHAR,
title VARCHAR,
content VARCHAR,
location VARCHAR,
startTime VARCHAR,
endTime VARCHAR,
published VARCHAR,
updated VARCHAR,
eventStatus VARCHAR
);
여기 코드입니다. 아래 insert 문을 볼 수 있습니다. 변수의 출력에는 모두 데이터가 들어 있습니다. 아마도 내 구문이 잘못 되었나요?
var db = Ti.Database.open('content');
Titanium.API.info(" number or results returned = " + cal.feed.entry.length);
var i;
for (i=0; i < cal.feed.entry.length; i++){
var e = cal.feed.entry[i];
var calUid = e.gCal$uid.value;
var title = e.title.$t;
var content = e.content.$t;
var location = e.gd$where.valueString;
var startTime = e.gd$when[0].startTime;
var endTime = e.gd$when[0].endTime;
var published = e.published.$t;
var updated = e.updated.$t;
var eventStatus = e.gd$eventStatus.value;
Titanium.API.info(calUid + title + content + location + startTime + endTime + published + updated + eventStatus);
var theData = db.execute('INSERT INTO events (gCal_uid, title, content, location, startTime, endTime, published, updated, eventStatus) VALUES("'+calUid+'","'+title+'", "'+content+'", "'+location+'", "'+startTime+'", "'+endTime+'", "'+published+'", "'+updated+'", "'+eventStatus+'")');
theData;
Ti.API.info("rows inserted" + i);
}
Ti.API.info("closed the db");
db.close();
하십시오 !!!!! SQL 문을 준비 할 때 가치를 잃어 버리십시오! 응답에 대해 – Benoit