Re[2]: [sqlite] Storing RTF text in a field

2005-09-20 Thread Sergey Startsev
Hello,

Use functions sqlite3_prepare(), then sqlite3_bind_blob to assign RTF
text to a blob parameter

Tuesday, September 20, 2005, 5:39:59 PM, you wrote:

>> Now when I try to save it to database, I get an error: unrecognized token:
>> "\". What should I do?


-- 
Best regards

 Sergey Startsev
 SQLite Analyzer - SQLite database management tool with GUI.
 http://www.kraslabs.com/sqlite_analyzer.html



Re: [sqlite] Storing RTF text in a field

2005-09-20 Thread Edwin Knoppert

Simple convert it to 2byte hex "0AFF00..." etcc.

So the update query should use X'your hex data here'




- Original Message - 
From: "Gaurav Patole" <[EMAIL PROTECTED]>

To: <sqlite-users@sqlite.org>
Sent: Tuesday, September 20, 2005 7:14 AM
Subject: [sqlite] Storing RTF text in a field



Hello,

  I have the following table



CREATE TABLE Tasks(taskID INTEGER PRIMARY KEY, parentTaskID INTEGER, 
projID

INTEGER, name varchar(25), assignee varchar(25), start_date timestamp,
end_date timestamp, completed_date timestamp, last_edited timestamp,
created_date timestamp, last_edited_by varchar(25), author varchar(25),
percent_complete INTEGER, priority INTEGER, status INTEGER, description
blob, last_modified timestamp);



With description field as BLOB.



I wish to store the description that may contain RTF text.

Example:



{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fprq2\fcharset
0 Times New Roman;}}

{\colortbl ;\red0\green0\blue255;}

\viewkind4\uc1\pard\fi-360\li900\tx900\f0\fs24 1.\tab Showing comment
notifications though all the notification options are unchecked when we 
copy

and paste the task having comments.

\par \pard\fi-360\li900 2.\tab Description of 15 to 20 lines is not
retaining when we reassigned the task.

\par 3.\tab Problem in copy and paste: Copy and pasting the task having
attachments, source file's attachments gets disappeared - \cf1\b
Completed\cf0\b0 .

\par 4.\tab Normal user is not able to mark his task as completed - \cf1\b
Completed\cf0\b0 .

\par 5.\tab Problem in copy paste: Not asking for changing resource when
resource is not available in the source project.

\par 6.\tab User level rights user s/d be able to move his task.

\par \pard

\par \pard\li360 Date: 19 September' 05

\par Private Build 62

\par

\par \pard\fi-360\li720\tx720 1.\tab User s/d attaches attachment while
assigning the new task.

\par \pard\fi-360\li720 2.\tab Problem with right click move to option: 
The
option is not working when user has not changed the resource name, means 
its

not working with default resource name.

\par 3.\tab Once click on no to all (if resource is not available) next 
time

unable to copy and paste the task from one project to another, also
simulating with moving tasks by drag and drop.

\par 4.\tab While right click move to don't allow the user to select
multiple resources initially rather than showing message later.

\par 5.\tab Making project status as on-hold or proposed, all its existing
tasks are not becoming on-hold.

\par 6.\tab Project manager s/d be able to view his completed and proposed
projects.

\par 7.\tab All the tasks of the completed projects s/d become completed.

\par 8.\tab Not changing assigned to field while moving the task from one
project to another project, by using right click move to option.

\par 9.\tab Assignee field s/d gets changed while reassigning the task 
from

right click - reassigned to option for example if amol is reassigning the
task to bhavna which is assigned to amol by sayali , in this case author 
s/d
be sayali and assignee s/d be amol. Presently assignee and author remains 
as

sayali.

\par \pard Reassigned to is not changing the assignee field, author and
assignee field remains same though task is reassigned by

\par }







Now when I try to save it to database, I get an error: unrecognized token:
"\". What should I do?



Thanks,

Gaurav.










[sqlite] Storing RTF text in a field

2005-09-19 Thread Gaurav Patole
Hello,

   I have the following table

 

CREATE TABLE Tasks(taskID INTEGER PRIMARY KEY, parentTaskID INTEGER, projID
INTEGER, name varchar(25), assignee varchar(25), start_date timestamp,
end_date timestamp, completed_date timestamp, last_edited timestamp,
created_date timestamp, last_edited_by varchar(25), author varchar(25),
percent_complete INTEGER, priority INTEGER, status INTEGER, description
blob, last_modified timestamp);

 

With description field as BLOB.

 

I wish to store the description that may contain RTF text.

Example: 

 

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fprq2\fcharset
0 Times New Roman;}}

{\colortbl ;\red0\green0\blue255;}

\viewkind4\uc1\pard\fi-360\li900\tx900\f0\fs24 1.\tab Showing comment
notifications though all the notification options are unchecked when we copy
and paste the task having comments.

\par \pard\fi-360\li900 2.\tab Description of 15 to 20 lines is not
retaining when we reassigned the task.

\par 3.\tab Problem in copy and paste: Copy and pasting the task having
attachments, source file's attachments gets disappeared - \cf1\b
Completed\cf0\b0 .

\par 4.\tab Normal user is not able to mark his task as completed - \cf1\b
Completed\cf0\b0 .

\par 5.\tab Problem in copy paste: Not asking for changing resource when
resource is not available in the source project.

\par 6.\tab User level rights user s/d be able to move his task.

\par \pard 

\par \pard\li360 Date: 19 September' 05

\par Private Build 62

\par 

\par \pard\fi-360\li720\tx720 1.\tab User s/d attaches attachment while
assigning the new task.

\par \pard\fi-360\li720 2.\tab Problem with right click move to option: The
option is not working when user has not changed the resource name, means its
not working with default resource name.

\par 3.\tab Once click on no to all (if resource is not available) next time
unable to copy and paste the task from one project to another, also
simulating with moving tasks by drag and drop.

\par 4.\tab While right click move to don't allow the user to select
multiple resources initially rather than showing message later.

\par 5.\tab Making project status as on-hold or proposed, all its existing
tasks are not becoming on-hold.

\par 6.\tab Project manager s/d be able to view his completed and proposed
projects.

\par 7.\tab All the tasks of the completed projects s/d become completed.

\par 8.\tab Not changing assigned to field while moving the task from one
project to another project, by using right click move to option.

\par 9.\tab Assignee field s/d gets changed while reassigning the task from
right click - reassigned to option for example if amol is reassigning the
task to bhavna which is assigned to amol by sayali , in this case author s/d
be sayali and assignee s/d be amol. Presently assignee and author remains as
sayali.

\par \pard Reassigned to is not changing the assignee field, author and
assignee field remains same though task is reassigned by 

\par }

 

 

 

Now when I try to save it to database, I get an error: unrecognized token:
"\". What should I do?

 

Thanks,

Gaurav.