Reading unicode Sqlite data using Firedac inside Delphi7 - unicode

Is there any way (or version) for FireDAC library to read/write ( or at least read) unicode data stored in sqlite database , under Delphi 7 ? We wrote them by another application we developed in Delphi 10.2 , but we still need to read them in the older project written in Delphi 7 .
Best regards .

Related

How to Read Word Document in Postgresql

I am new to this stuff, not sure if this can be achieved, I am expecting a bunch of word documents daily, which (structured data) I need to process and store its values to my POSTGRES. I searched over the internet, all I could find is storing the Word document in Blob, Bytea format, do encode, decode, etc, which is again returning text that I can not process. Can this be achieved, if so can you please provide a sample code that can count words/characters/lines in the word document, I can extend that to my need and requirement. I am using Ubuntu on AWS,
show server_encoding;
UTF8
I have tried below
pg_read_file('/var/lib/postgresql/docs/testDoc.docx');
pg_read_binary_file('/var/lib/postgresql/docs/testDoc.docx')
encode(pg_read_binary_file('/var/lib/postgresql/docs/testDoc.docx'),'base64')
decode(encode(pg_read_binary_file('/var/lib/postgresql/docs/testDoc.docx'),'base64'),'base64')::text;
Regards
Bharat
You can checkout the OpenXML library from Microsoft.
This is a .NET Frameowrk based OSS library that maps office documents as objects.
With this library you can build, for example, a program that extracts informations and send data to your PostgreSQL.
Tis library is available for the .NET Core framework too, so you can build a program tha can be run on Ubuntu too .NET Core library on NUGET.
Another way is to write a Java program. Same concept.
In Java you can use Apache POI library to read office documents.
Remember that an office document is a compressed file (with ZIP algorithm) that contains XML data, that represents the document.
One option is to use some front end language to read the docx files and upload them to Postgres.
In Ruby you could:
Install the docx and pg gem.
gem install docx pg
and then create something like the ruby file:
require 'docx'
require 'pg'
doc = Docx::Document.open('document.docx')
conn = PG.connect( dbname: 'postgres_db', user: 'username', password: 'password' )
doc.paragraphs.each do |p|
conn.exec( "INSERT INTO table paragraphs (paragraph) VALUES ( $1 )", [ p ] )
end
I'm sure this could be done in Python or whatever language you know best.

Sybase is loading incorrect numeric data sent by Spring batch - Jdbc Template

I have a ETL job built using spring batch and DAO layer uses Spring's jdbc template.The issue is with loading of numeric datatype. When the batch is running for large number of records, good amount of numeric values(not all) will be loaded incorrectly(pattern is that value will be multiplied by 10^scale).
I am using batchUpdate method and preparedStatement. The driver used is jconn4.jar from sybase version 7.0.7.
I am getting the values printed while setting the ps, and do not see the values being manipulated at java side.
Could someone please advice on what could be causing this.
Thanks in advance.
Edit: Further info Sybase version 15.7, Spring core and jdbc version 4.2.6, Spring batch version 3.0.4, java version 8
Also has someone used sybPreparedStatement from jConnect library? I found a sybase infocenter link where they recommend using it perticularly when using numeric data types but I do find the documentation around how to use this ps insignificant. Could you pl share if you have tried using SybPS and what were the challenges, and if you could successfully use that.

PostgreSQL + Delphi XE7 + ADO + ODBC

Our application successfully communicates with various databases (MSSQL, Oracle, Firebird) via ADO, that's why I'm trying to use ADO to add the PostgreSQL option to our software. I use standard PostgreSQL ODBC provider. All was fine until I faced with the problem with the large TEXT fields. When I use Unicode version of the provider and try to get TEXT field AsString, the application is just crushed with EAccessViolation in method RemoveMediumFreeBlock(). ANSI version works, but it cuts the content of the field (I guess the characters besides default 8190 LongVarChar limit). Small TEXT fields are read OK.
Could you suggest me what to do with this issue?
Is there the better option to work with PostgreSQL via ADO in Delphi?

What do I have to pay attention when upgrading from Firebird 1.5.6 to 2.5

I have problem with my Delphi + Firebird application that works on two Windows 7 machines.
Firebird database used is 1.5.6. and is placed on server machine and the client application is on the other.
From time to time application is freezeing itself for random time from 30 sec to 2 min.
Maybe upgradeing to the new version it will stop making problems to me.
You can first take a look at this which was a presentation during firebird conference 2011
Few things I ran into while I was upgrading were:
reserved word "type" was used as a column name in a table. I had to change it to something esle in database and application code.
my database used my own UDF, which was compiled in a manner, that made it impossible to use with Firebid 2.5 server. I had to recompile it, and since it was written in C, and I am not experienced C programmer, that was kinda challenge.

Code in SQL Database and Static Library - iPhone

My app uses a local SQLite database to read data. Just a couple of questions :
Is this type of database classed as a "Static Database" ?
Does the database have any code appended to it (e.g Obj C code) when compiled in xCode ?
Thanks,
Martin
Think of SQLite as a library that gets statically compiled and linked with your program and allows you to read and write to a file as if it is a database.
From the SQLite site:
SQLite is a software library that
implements a self-contained,
serverless, zero-configuration,
transactional SQL database engine.
The data itself can be stored in files on the filesystem and no objective-c code is appended to it. The database does not have to be static, i.e. you can use your code to read or write, from and to the database. If that is what you meant by static.