Main Page | Class List | Class Members | Related Pages

Simple Database Objects Documentation

0.1

Introduction

The sdbo library is a set of helper classes for use with ODBC database drivers. Runs on Windows and Linux platforms.

What can I use this library for?

You can use it for any database driven application. First of all, you need to decide if you want to use ODBC for your application. There are many articles about this, and lots of discussion going on. The main argument is portability: An application that talks to the odbc driver manager can talk to every databases with an odbc driver. An application that talks to a specific database's native API will need a rewrite to talk to another database.

So, if you decide to use ODBC, this package might be interesting for you if you are familiar with SQl but not with ODBC, and you just want to connect to a database and execute query statements, without caring about odbc handles, data types, and API calls.

On the other hand, if you need to access the raw odbc api you can still use the classes to hide away bulk operations:

 SqlResult r = (new OdbcConnection).connect("someserver").execDirect("select something from somewhere");
 HSTMT hstmt = r.handle();
 

Examples

This is the Hello world example for sdbo:

        
        import std.stdio;
        import sdbo.odbc;
        
        void main()
        {
                
                /* Hello world example */
                
                try {
                        
                        (new OdbcEnvironment).connect("foo").execDirect("bar");
                        
                } catch(SqlException e) {
                        
                        fwritefln(stderr, "Hello world!");
                        e.print();
                }

        }

        

More Examples ...

Problems

Installation

Requirements:

Version Windows

Version Linux

All Versions

ODBC Headers

Actually I had to do some modifications in the odbc headers for sdbo.lib and libsdbo.a to compile, and MKoD's declaration files are not finished yet, so I bundled a copy of them that works with this project. If the samples won´t compile, use -version=bundled_headers which causes the std.c.windows.* modules to be ignored and the bundled headers to be used. The bundled headers are going to disappear as soon as the MKoD headers are in a stable release.

The linux version always compiles with the bundled headers.

Install:

All Versions

Version Windows

Version Linux

Compile test:

Version Windows

Version Linux

Versions:

The version of this package is 0.1.

0.1 just means it is not finished yet. The package release is a zip file in the project's svn at dsource.org. The zip is called "sdbo-0.1.*.zip, being * an incremental number idicating changes to the 0.1 package. I am trying to maintain the zip file synchronized with the trunk. Compare the last digit of the file you downloaded and the file available here: http://svn.dsource.org/svn/projects/sdbo/downloads/ If they differ, your package is not up to date.

Starting from 0.1.6, there is now a package sdbo-0.1.*.tar.gz. The content is identical.

Todo:

Links:


Generated on Tue Sep 21 00:33:13 2004 for Simple Database Objects by doxygen 1.3.8