SQL access to TPS databases without ODBC driver

sql-tps
Tags: #<Tag:0x00007f46de0b47b8>

#1

Here is standard SCHOOL application demonstrating a possibility to SQL access to TPS databases. Just run school.exe, there are 2 items under “SQL” menu: “Browse Teachers with SQL filter” and “Arbitrary SQL Queries”.

First item opens Teachers browse and allows to filter like

t.LastName LIKE(‘C%’) AND m.Description IN(‘Law’, ‘Sociology’)

where t and m are aliases for Teachers and Majors tables, respectively.

Second item allows to execute any arbitrary SELECT statement against entire database, for example:

– sample sql script:
SELECT s.lastname || ’ ’ || s.firstname AS “full name”, s.Number AS number,
s.GradYear AS “grad year”, m.description AS major,
s.city AS city, s.telephone AS phone
FROM students s
JOIN majors m ON m.number=s.major
ORDER BY s.lastname

and immediately see the result set in listbox.

I hope this is interesting to someone.


#2

Hi Mike,

Well that is interesting :slight_smile:
How are you doing it?
I suppose the presence of the SQLite DLL must be a clue.

Are you somehow creating a DNSless TPS connection and querying it via SQLite or …?

Graham


#3

we magicians do not reveal our secrets :slight_smile:


#4

sqlite can use in memory databases https://www.sqlite.org/inmemorydb.html so we may think that Mike is using that facility :slightly_smiling_face:


#5

sqlite is a hat which the audience sees, sql filter to real TPS data is a rabbit :slight_smile: