|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Connecting to non SQL databaseWhen 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? "Jake" <J***@discussions.microsoft.com> wrote in message Nothing to do with Visual Studio per se. I would suggest that you ditch ODBC news:A0500797-3912-4DDD-8225-71D832B0D8BA@microsoft.com... > 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? and use OleDb instead. The following link should assist: http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForUniDataAndUniVerse On Wed, 30 Mar 2005 08:29:05 -0800, "Jake" <J***@discussions.microsoft.com> wrote: ¤ 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) |
|||||||||||||||||||||||