SQlite to Field formatting. HELP!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
SQlite to Field formatting. HELP!
So here i am, trying my first SQLite app. I am writing a reader for existing databases. I am using the sample to guide me through the syntax.
I got it to open the database but when it imports the database it makes a mess of the text when ever it finds an accent or any character that is extended.
Thank you for your help.
I come from VB, RealBasic, js, etc.
Thanks for your help
I got it to open the database but when it imports the database it makes a mess of the text when ever it finds an accent or any character that is extended.
Thank you for your help.
I come from VB, RealBasic, js, etc.
Thanks for your help
Re: SQlite to Field formatting. HELP!
Just a guess here, but had a similar issue recently. When your pulling the information, you want to make sure your not pulling tabs, commas, apostrophes, etc. which was solved with this formatting of the request-
Code: Select all
// the column in the db is Summary, and it contained tabs, returns, etc.
// although not strictly necessary, I also wrapped the column name with ` `...
REPLACE(`Summary`,X'09',CAST( ' ' as text ))
Re: SQlite to Field formatting. HELP!
Honestly, I am trying to wrap my head around lc.
So what I am working on is a Bible program to use as a tool for research im doing.
I am using different versions and some of the databases include characters which look horribly formatted in LiveCode but the SQL browser displays it right.
And so on. I need anything in <RF> not to show.And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.<RF>And the evening…: Heb. And the evening was, and the morning was<Rf><CM>
Thank you in advance for your help...
Re: SQlite to Field formatting. HELP!
know of any tutorial that can lead me on this?
Re: SQlite to Field formatting. HELP!
This sounds like a Unicode problem.
try this on the result returned from the db query (textReturned)
try this on the result returned from the db query (textReturned)
Code: Select all
put textDecode(textReturned,"UTF8") into textReturned
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
Re: SQlite to Field formatting. HELP!
<RF> tags in db could be request filter stored procedures.
To strip those there will be a one-liner replacetext regex. I am out using phone atm, otherwise I would play and test but it should be easy to eliminate stuff between the tags.
To strip those there will be a one-liner replacetext regex. I am out using phone atm, otherwise I would play and test but it should be easy to eliminate stuff between the tags.
Re: SQlite to Field formatting. HELP!
Very kind!AndyP wrote: ↑Tue May 08, 2018 8:33 amThis sounds like a Unicode problem.
try this on the result returned from the db query (textReturned)
Code: Select all
put textDecode(textReturned,"UTF8") into textReturned
This is what I did, it worked but is that okay?
put databaseGetContactDetails() into textReturned
put textDecode(textReturned,"UTF8") into textReturned
put textReturned into field "Verse"
Re: SQlite to Field formatting. HELP!
Would love to see that being used...
I will have to use regex a lot in this context so your help would be awesome.
Re: SQlite to Field formatting. HELP!
use urlencode and urldecode: http://livecode.wikia.com/wiki/URLEncode
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w