?
Solved

VB.net Standard edition and database connections

Posted on 2004-11-29
4
Medium Priority
?
235 Views
Last Modified: 2010-05-18
Hi, I have a pretty simple question.

I'm thinking about getting VB.net 2003 Standard edition (100 bucks or so), but it isn't clear to me what limitations this software has w/respect to database connectivity.

Will the standard edition allow me to connect to other databases (besides sqlserver) like Oracle & Mysql?

I've read different/contradictory things about this and microsoft itself does its best to muddy/avoid the issue.
What seems clear is that databases cannot be accessed remotely using vb.net 2003 standard, but it isn't clear if I have Oracle running as a localhost whether I'll be able to connect.

Thanks.

0
Comment
Question by:pdanese
  • 3
4 Comments
 
LVL 8

Expert Comment

by:mani_sai
ID: 12696248
Hello pdanese ,

Regarding database connectivity issues(remotely or locally).

It is possilbe to connect using vb.net 2003 / ado.net.

You have to use proper ADO.Net provider.

You can find the list of providers for your scenario:


http://www.sqlstrings.com/

http://www.sqlstrings.com/SQL-Server-connection-strings.htm

http://www.able-consulting.com/ADO_Conn.htm


Hope it helps
0
 
LVL 8

Accepted Solution

by:
mani_sai earned 120 total points
ID: 12696282
For Oracle:

Here are some examples of connection string you can use to connect to oracle databases:

Oracle .NET Data Provider - From Microsoft

 System.Data.OracleClient
The Microsoft .NET Framework Data Provider for Oracle is an add-on component to the .NET Framework 1.0 that provides access to an Oracle database using the Oracle Call Interface (OCI) as provided by Oracle Client software.

Oracle 8i Release 3 (8.1.7) Client or later must be installed for this provider to function correctly.

Note: This .NET Data Provider is included in version 1.1 of the .NET Framework. You need only download this, if you are running version 1.0.

Using C#:

using System.Data.OracleClient;
 
OracleConnection oOracleConn = new OracleConnection();
oOracleConn.ConnectionString = "Data Source=Oracle8i;" +
                               "Integrated Security=SSPI";
oOracleConn.Open();

Using VB.NET:

Imports System.Data.OracleClient

Dim oOracleConn As OracleConnection = New OracleConnection()
oOracleConn.ConnectionString = "Data Source=Oracle8i;" & _
                               "Integrated Security=SSPI";
oOracleConn.Open()


--------------------------------------------------------------------------------

 Oracle .NET Data Provider - From Oracle
 Oracle.DataAccess.Client
The Oracle .NET Framework Data Provider from Oracle is an add-on component to the .NET Framework.

Using C#

using Oracle.DataAccess.Client;
...
OracleConnection oOracleConn = new OracleConnection();
oOracleConn.ConnectionString = "Data Source=MyOracleServerName;" +
                               "Integrated Security=SSPI";
oOracleConn.Open();


Using VB.NET

Imports Oracle.DataAccess.Client
...
Dim oOracleConn As OracleConnection = New OracleConnection()
oOracleConn.ConnectionString = "Data Source=MyOracleServerName;" & _
                               "Integrated Security=SSPI";
oOracleConn.Open()

--------------------------------------------------------------------------------

 OraDirect .NET Data Provider - From CoreLab
 CoreLab.Oracle
The OraDirect .NET Data Provider is an add-on component to the .NET
Framework that provides access to an Oracle database using the Oracle
Call Interface (OCI) as provided by Oracle Client software.

Using C#

using CoreLab.Oracle;

OracleConnection oOracleConn = new OracleConnection();
oOracleConn.ConnectionString = "User ID=myUsername;" +
                              "Password=myPassword;" +
                              "Host=(local);" +
                              "Pooling=true;" +
                              "Min Pool Size=0;" +
                              "Max Pool Size=100;" +
                              "Connection Lifetime=0";
oOracleConn.Open();

-----------------------------------------------------------------------------------------

Using VB.NET

Imports CoreLab.Oracle

Dim oOracleConn As OracleConnection = New OracleConnection()
oOracleConn.ConnectionString = "User ID=myUsername;" & _
                              "Password=myPassword;" & _
                              "Host=(local);" & _
                              "Pooling=true;" & _
                              "Min Pool Size=0;" & _
                              "Max Pool Size=100;" & _
                              "Connection Lifetime=0"
oOracleConn.Open()



----------------------------------------------------------------------------------------------------
For Oracle OLE DB Provider

' VB.NET
Imports System.Data.OleDb
...
Dim oOleDbConnection As OleDbConnection
Dim sConnString As String = _
         "Provider=OraOLEDB.Oracle;" & _
         "Data Source=MyOracleDB;" & _
         "User ID=myUsername;" & _
         "Password=myPassword"
oOleDbConnection = New OleDb.OleDbConnection(sConnString)
oOleDbConnection.Open()

--------------------------------------------------------------------------------------------------
For Oracle ODBC Driver

' VB.NET
Imports System.Data.Odbc
...
Dim oODBCConnection As OdbcConnection
Dim sConnString As String = _
         "Driver={Microsoft ODBC for Oracle};" & _
         "Server=OracleServer.world;" & _
         "Uid=myUsername;" & _
         "Pwd=myPassword"
oODBCConnection = New Odbc.OdbcConnection(sConnString)
oODBCConnection.Open()

0
 

Author Comment

by:pdanese
ID: 12696418
I just want to make sure that your suggestions will work with the standard edition (i.e. NOT the full-blown Professional edition that costs $1000 or so).

Thanks.

0
 
LVL 8

Expert Comment

by:mani_sai
ID: 12696836
Yup
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Loops Section Overview
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question