How to manage german mutated vowel in SQLite

Jan Schenkel janschenkel at yahoo.com
Thu Nov 20 10:59:05 EST 2008


Hi Reinhold,

The question must have slipped by me, but the best way
to avoid this problem, is by using placeholders and
variables - the RevDB drivers will then do the
necessary substitutions.

So your code would become something like:
##
put "INSERT INTO Text_table VALUES (null,:1,:2)" into
tSQL
put "'{\rtf\mac *CR*}'" into tData[1]
put "'{\rtf\mac *CR*\'8A\'9A\'9F}'" into tData[2]
put revdb_execute(gConID,tSQL,"tData") into tTmp
##

Important to note is that you're giving the _name_ of
the variable as a parameter, inside a quoted string.
You can use a list of names, or (as I did here) the
name of an array, and then the RevDB system picks up
the data.

HTH,

Jan Schenkel.
--
Quartam Reports & PDF Library for Revolution
http://www.quartam.com


--- Reinhold Venzl-Schubert
<r.venzl-schubert at macbay.de> wrote:
> Hello!
> 
> I found the solution myself!
> 
> SQLite interprets the " ' " in  '{\rtf \mac
> *CR*\'8A\'9A\'9F} as the  
> end of a value.
> Therefore the instruction is to long.
> 
> I replaced all " ' " witn " ' ' " and then it works
> well.
> SQLite seems to cut of the second " ' " itself,
> because in the  
> database I find only on " ' "
> 
> Allthough this group had been a great help for me.
> To word it in english forced me to think more
> exactly about my problem.
> 
> :-)
> Reinhold
> 
> 
> > In my program I use a SQLite database, to store
> sentences in german
> > language.
> > I can store sentences as rtf-text with mutated
> vowels and can get them
> > back from SQLite, everything works well.
> >
> > But now I want to export some records and reimport
> them later.
> >
> > This is my export-script:
> >
> > put "SELECT * FROM Text_table" into tSQL
> > put revdb_querylist(,,gConID,tSQL) into Text_data
> >
> > Text_data:
> > 1	Text_table	{\rtf\mac *CR*}	{\rtf\mac *CR*aou}
> {\rtf\mac *CR*\'8A\'9A
> > \'9F}	
> >
> > For my import-script I changed the TABs in
> Text-data like this:
> >
> > put "INSERT INTO Text_table VALUES (null,
> '{\rtf\mac *CR*}', '{\rtf
> > \mac *CR*\'8A\'9A\'9F}')" into tSQL
> > put revdb_execute(gConID,tSQL) into tTmp
> >
> > When there is a german mutated vowel in the value
> SQLite refuses to
> > create a new record.
> >
> > What can I do?
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and
> manage your subscription preferences:
>
http://lists.runrev.com/mailman/listinfo/use-revolution
> 



      



More information about the use-livecode mailing list