[Mono-list] mBas now understands rootnamespace argument

A Rafael D Teixeira rafaelteixeirabr@hotmail.com
Mon, 03 Feb 2003 20:33:18 -0200

>From: "Daniel Morgan" <danmorg@sc.rr.com>
>Subject: RE: [Mono-list] mBas now understands rootnamespace argument
>Date: Mon, 3 Feb 2003 15:28:34 -0500
>Hi Rafael,
>Is it possible to do database stuff with MonoBasic yet?
Probably yes.

But just now I'm far from my machines to be able to test your code, I'll 
test it later and report it here.

>For example, here is a simple program that works on .NET below:
>Imports System
>Imports System.Data
>Imports System.Data.SqlClient
>Module Module1
>     Sub Main()
>         Dim con As SqlConnection
>         con = New SqlConnection("Server=localhost;database=pubs;user

Unless you are going to run with mono on windows, probably you'll have to 
adjust this connection string, to use another machine as the server.

>         con.Open()
>         Dim cmd As SqlCommand
>         cmd = con.CreateCommand()
>         cmd.CommandText = "select fname from employee"
>         Dim reader As SqlDataReader
>         reader = cmd.ExecuteReader()
>         If (reader.Read()) Then
>             Dim firstName As String
>             firstName = reader.GetString(0)
>             Console.WriteLine(firstName)
>         Else
>             Console.WriteLine("No data returned.")
>         End If
>     End Sub
>End Module

The rest of the code looks quite runnable for the current state of mbas 
generated code and vb.net runtime support in our class library.

If you don't beat me on this, I'll report later.

Thanks for your interest,

Rafael Teixeira
Brazilian Polymath
Mono, MonoQLE Hacker

The new MSN 8: smart spam protection and 2 months FREE*