C
Chris
Hi-
I've got a pooled connection string I've written in C#.
namespace SomeProgram
{
static class Program
{
public static OleDbConnection DBConnectionString
{
get
{
string conn;
DataSet ds = new DataSet();
conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=DB
\\somedb.mdb";
OleDbConnection oleconn = new OleDbConnection(conn);
oleconn.Open();
return oleconn;
}
}
}
}
Now it works great in C#, but I'm trying to do the same thing in VB.
When I code the VB equivalent and try to reference it
(Program.DBConnectionString), it errors out and says that 'Program is
not defined'. Any suggestions and tips are more than welcome. Thanks.
I've got a pooled connection string I've written in C#.
namespace SomeProgram
{
static class Program
{
public static OleDbConnection DBConnectionString
{
get
{
string conn;
DataSet ds = new DataSet();
conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=DB
\\somedb.mdb";
OleDbConnection oleconn = new OleDbConnection(conn);
oleconn.Open();
return oleconn;
}
}
}
}
Now it works great in C#, but I'm trying to do the same thing in VB.
When I code the VB equivalent and try to reference it
(Program.DBConnectionString), it errors out and says that 'Program is
not defined'. Any suggestions and tips are more than welcome. Thanks.