lorena Posted April 8, 2008 Posted April 8, 2008 I am trying to write an application in VB.NET pulls information from an Oracle server and will write it, with other information, to a SQL database. We established a link between the SQL server and the Oracle db and can successfully use "OPENQUERY" to get data from Oracle via SQL. My problem is trying to do the same thing in VB.Net. I get this error: "Could not create an instance of OLE DB provider 'MSDAORA'" I wrote some lines of codes just to test the connection. It bombs out with the error message at the "ExecuteReader" statement Here is my code: (SQL_PROD10 is the linked server name) Imports System.Data Imports System.Data.OleDb Imports System.Data.SqlClient Private Sub continueButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles continueButton.Click Dim connectionString As String connectionString = "Data Source=INTRANET\Server1;Initial Catalog=master;Integrated Security=True" Dim sqlConnection As New SqlClient.SqlConnection(connectionString) Dim sqlCommand As New SqlCommand("select * from openquery (sql_prod10,'Select * from jobno_progno')", sqlConnection) sqlConnection.Open() Dim jobNoReader As SqlDataReader = sqlCommand.ExecuteReader() While jobNoReader.Read Dim jobnostring As String jobnostring = CStr(jobNoReader("JobNo")) Debug.WriteLine("Job No " + jobnostring) End While jobNoReader.Close() End Sub Does anyone have experience with linked servers? I don't and would really appreciate any help! Thanks Quote
Diesel Posted April 12, 2008 Posted April 12, 2008 Interesting situation. I would count out security and mdac as the errors since you have the linked server working and are using windows auth. http://support.microsoft.com/kb/280106 Message 3 is the error you received. The registry change may work. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.