Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL 2000 Linked servers in VB.NET

Status
Not open for further replies.

clivelp

Programmer
Jan 26, 2003
3
GB
I am trying to access FoxPro 2.6 tables and have created a linked server with a System.DSN ODBC driver as the data source, and the correct FoxPro tables are listed in mySQLServer.myLinkedServer.Tables node.

In a VB.NET app Using OleDb Connection and Command objects I can view the 'pubs' tables ok, but cannot view the linked server FoxPro tables, nor can I see them in Server Explorer

Sample of code
Code:
Dim myConnString As String = "Provider=SQLOledb;" & _
                "Data source=myDataserver\mySQLServer;" & _
                "Integrated Security=SSPI;"

Dim mySQLString As String = "SELECT Em_Fname,Em_Lname, " & _
         "Em_Alias, Em_PWord FROM myLinkedServer.Employee"

Dim myConnection As New OleDbConnection(myConnString)

Dim myCommand As New OleDbCommand(mySQLString, myConnection)

Try
    myCommand.Connection.Open()
    Dim myReader As OleDbDataReader

    etc.etc.
I have used many combinations of the code displayed above with no effect. Could anyone Please point me in the right direction.

Many thanks

 
Since this is here, BE SURE YOUR SQL SERVER 2000 IS UP TO DATE!!!, avoid adding to the current sh*t storm of W32.Slammer...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top