2002-08-18 Rodrigo Moya <rodrigo@ximian.com>
[mono.git] / mcs / class / System.Data / System.Data.OleDb / TestGDA.cs
1 using System;
2 using System.Data.OleDb;
3
4 namespace Mono.Data.GDA.Test
5 {
6         public class TestGDA
7         {
8                 private IntPtr m_gdaClient = IntPtr.Zero;
9                 private IntPtr m_gdaConnection = IntPtr.Zero;
10                 
11                 static void Main (string[] args)
12                 {
13                         TestGDA test = new TestGDA ();
14                         
15                         /* initialization */
16                         libgda.gda_init ("TestGDA#", "0.1", args.Length, args);
17                         test.m_gdaClient = libgda.gda_client_new ();
18
19                         /* open connection */
20                         test.m_gdaConnection = libgda.gda_client_open_connection (
21                                 test.m_gdaClient,
22                                 "PostgreSQL",
23                                 "", "");
24                         if (test.m_gdaConnection != IntPtr.Zero) {
25                                 System.Console.Write ("Connection successful!");
26
27                                 /* close connection */
28                                 libgda.gda_connection_close (test.m_gdaConnection);
29                         }
30                 }       
31         }
32 }