Direkt zum Hauptbereich

Posts

Lazarus IDE, Oracle 11g and German Umlaute

Working with a database can be so easy - as long as you don't need to care about localization or languages with more or other letters than english. One of these Languages is German. And here the problem starts... Introduction Let's look at a simple scenario: Inserting a text with German letters like ä, ö, ü and ß into the Oracle 11g database. And right now there already could be a problem when trying to select it again. So what is the problem here? Actually the problem itself is very simple: The character encoding. However the solution is not as simple. I tried to connect to Oracle via an ODBC connection from Lazarus IDE for inserting german press releases with a lot of Umlauts (äöü). The result in the database was a mess. So how to solute this mess? The "problematic chain" First of all we have to consider that different operating systems have different character sets. Usually current Linux distributions have a Unicode character set in contrast to Windows, u...

Lazarus IDE and TOracleConnection - A How-To

Free programming IDEs are a great benefit for everybody who's interested in Programming and for little but ambitious companies. One of these free IDEs is the Lazarus IDE . It's a "clone" of the Delphi IDE by Embarcadero (originally by Borland). But actually Lazarus is much more than a clone: Using the Free Pascal-Compiler , it was platform-independent and cross-compiling since it was started. I am using Lazarus very often - especially for building GUIs easily because Java is still Stone-Age when a GUI is required (though there is a couple of GUI-building tools - they all are much less performant than Delphi / Lazarus). In defiance of all benefits of Lazarus there still is one Problem. Not all Components are designed for use on a 64 bit systems. Considering that 64 bit CPUs are common in ordinary PCs since at least 2008, this is very anpleasant. One of the components which will not be available on 64 bit installations is the TOracleConnection of Lazarus' SQLDB ...

How to boot openSuSE 12.2 from SD Card

My old Asus EeePC was collecting dust since its display backlight driver chip got broken in August 2012. Now, for a project at the university its second life seems to be come. Unfortunately I disassembled its RAM memory and the HDD. Whilst it was no problem to assemble the built-off RAM again, the HDD was already built-in into an external HDD enclosure for a use as backup drive. I din't want to disassemble it again, so what should I do to get my EeePC running again...? The solution was pretty simple: with an SD Card. But why after all using an SD Card, when an USB flash drive would be more common? The answer is pretty simple. An SD Card can be put into the reader in the EeePC and is covered completely. So its mechanically robust against collisions and cannot be torn off accidentally nor removed. And at least: why not using an SD card? So greenly I bought an SDHC card, inserted it into the EeePC and created a bootable USB flash drive with openSuSE 12.2. An old flat screen, connec...

How to teach Microsoft Access in Oracle Transactions

Because my Article about how to teach Mircosoft Access in Oracle transactions seems to be very popular, I decided to post an English version of it. In future I will concentrate to write in English. Microsoft Access is a widely used product in a number of companies in all industries. This is because the Microsoft Office package is widely used, and access solution 'so ubiquitous. Unfortunately, this solution has its drawbacks. These are noticeable when man realizes an Access front end for a database connection. One of these drawbacks is the lack of ability to implement transactions or to use stored procedures and table functions. About the Access interface alone this is not possible. While there is an SQL pass-through to execute DBMS-proprietary SQL queries, but these are often only possible static and need to be adjusted. Visual Basic for Applications (VBA briefly) here can provide some relief. So it is possible, for example, assign the button controls of an Access form VBA mac...

The tricky issue of Oracle, JDBC and Android

Since Christmas, I am proud owner of an Android powered smart phone (Samsung Galaxy S Plus). The first thing I wanted to do was coding an java app to connect to Oracle database and fire lots of queries into the DBMS. As you maybe know, a JDBC driver is needed for this intention. You can download it at Oracle Software Downloads ( http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html ). And as you also know, you need to add in Eclipse IDE as a JAR file to your project. If you now test your app with a connection code like the one below, you will get a lot of exceptions: Driver d = (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance(); DriverManager.registerDriver((d)); Connection c = DriverManager.getConnection("jdbc:oracle:thin:@instance.server.com:1521:name", "user", "password"); I had not even been able to investigate what exception exactly does occur or where it does come from. It's ca...

Wie man Access 2010 (Oracle-) Transaktionen beibringt

Microsoft Access ist ein vielgenutztes Produkt in zahlreichen Unternehmen aller Branchen. Dies liegt darin begründet, dass das Microsoft-Office-Paket weit verbreitet ist, und die ,Access-Lösung' somit überall vorhanden. Leider hat diese Lösung auch Nachteile. Diese machen sich bemerkbar, wenn mann ein Access-Frontend für eine Datenbankanbindung realisiert. Einer dieser Nachteile ist die fehlende Möglichkeit, Transaktionen zu realisieren oder auf Stored Procedures sowie Table-Functions zurückzugreifen. Über die Access-Oberfläche allein ist dies auch so nicht möglich. Es gibt zwar einen SQL-Pass-Through, um DBMS-proprietäre SQL-Abfragen auszuführen, jedoch sind diese oftmals nur statisch möglich und müssen angepasst werden. Visual Basic for Applications (kurz VBA) kann hier eine gewisse Abhilfe schaffen. So ist es  z. B. möglich, den Button-Steuerelementen eines Access-Formulars VBA-Makros (Subs) zuzuweisen, und diese beim Klicken auszuführen. Ereignisse wie dieses OnClick-Ereign...

Oracle als ODBC-Datenquelle Excel 2010 - der SQL-Pass-Through

Excel ist das neben Word vermutlich am weitesten verbreitete Office-Produkt in Unternehmen sowie auf privaten Rechnern. Und Excel hat schon sehr umfangreiche Funktionen. Interessant und knifflig wird es aber, wenn man auf Daten aus einer Datenbank (Oracle) zugreifen möchte. Erforderlich hierfür ist eine eingerichtete ODBC-Datenquelle. Über das Menü "Daten", Untermenü "Aus anderen Quellen", Eintrag "Von Microsoft Query" kann man nun über den sog. DSN und Microsoft Query Daten aus der Datenbank abrufen. Möchte man aber eine proprietäre Oracle-Abfrage formulieren, wird Microsoft Query die Anfrage nicht verarbeiten könnnen. Der dafür liegt in der Vorverarbeitung der eingegebenen Statements. In Query selbst gibt es keine Möglichkeit, dies zu umgehen - in Excel selbst schon. Daher wählt man über eine "Dummy"-Abfrage einige Daten aus und manipuliert das SQL-Statement postwendend. Im abschließenden Query-Dialog wählt man "Daten an Excel zurückgeben...