Connecting to non SQL database

G

Guest

When i try to connect to an old UniVerse database (using their ODBC drivers)
visual studio (vc# standard) gives me an error saying something to the effect
that this version can only connect to Access/SQL databases. What version of
visual c# or visual studio do I need to connect to any ODBC complient
database?
 
M

Mark Rae

When i try to connect to an old UniVerse database (using their ODBC
drivers)
visual studio (vc# standard) gives me an error saying something to the
effect
that this version can only connect to Access/SQL databases. What version
of
visual c# or visual studio do I need to connect to any ODBC complient
database?

Nothing to do with Visual Studio per se. I would suggest that you ditch ODBC
and use OleDb instead. The following link should assist:

http://www.able-consulting.com/MDAC...viders.htm#OLEDBProviderForUniDataAndUniVerse
 
P

Paul Clement

¤ When i try to connect to an old UniVerse database (using their ODBC drivers)
¤ visual studio (vc# standard) gives me an error saying something to the effect
¤ that this version can only connect to Access/SQL databases. What version of
¤ visual c# or visual studio do I need to connect to any ODBC complient
¤ database?

The Server Explorer in the Standard version is somewhat limited, however you can still use code to
create your connections. If you have an ODBC driver you should be able to use the
Microsoft.Data.ODBC namespace. There is an example below:

Public Sub ConnectToOracleODBC()

Dim ODBCConnection As New Microsoft.Data.Odbc.OdbcConnection


ODBCConnection.ConnectionString = "DRIVER={Microsoft ODBC for Oracle};" & _
"SERVER=ServerName;" & _
"UID=userID;PWD=password;"

ODBCConnection.Open()

'...
'...
'...

ODBCConnection.Close()

End Sub


Paul
~~~~
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top