I have attached a screenshot of SQL# For GTK# retrieving data from a
PostgreSQL database on Linux.

I used Mono 0.17, GTK# 0.6, gtk+ 2.0, and the PostgreSQL database that came
with Red Hat Linux 7.2 i386.

To do this, you will need:
- Linux
- GTK+ 2.0 and dependencies
- Mono 0.17
- GTK# 0.6
- source to mcs 0.17

For Red Hat, there are RPMs at a local mirror, or you could use Red Carpet
at http://www.ximian.com/
For Debian, there are debs at
http://www.atoker.com/mono/

GTK# 0.6 can be found at:
http://gtk-sharp.sf.net/

Mono 0.17 can be found at:
http://www.go-mono.com/download.html

Unfortunately, I have been unsuccssfull at retrieving data from PostgreSQL
on Cygwin with SQL# For GTK#.  Mono crashes when doing so.

Once you have PostgreSQL, gtk# 0.6 and up and running on Mono 0.17, cd into
the mcs 0.17 source and:

    cd tools/SqlSharp/gui/gtk-sharp
    export CSHARPCOMPILER=mcs
    export CLR_LIBS_PATH=$HOME/mono/install/lib
    make -f win32.make

if it compiles successfully, try running it:
    mono sqlsharpgtk.exe

If it loads successfully, click File -- Connect

   Select Provider: PostgreSQL

and enter your connection string.
For me, I used:

   host=localhost;dbname=test;user=postgres

Click Ok.

if you didn't get no error saying it couldn't connect, try entering some
SQL:
  SELECT * FROM pg_tables

Click Execute, and you should get a result of tables.

There is an alternative way to display the results, click the Output button.
Instead of a grid (Gtk.TreeView) it is a text viewer (Gtk.TextView).

<<attachment: SQL#4GTK#PostgreSQL.png>>

Reply via email to