Results 1 to 2 of 2

Thread: Query a linked mySQL database

  1. #1
    Join Date
    May 2003
    Posts
    1

    Unhappy Query a linked mySQL database

    We have SQL Server 2000 on a Windows 2000 server and a mySQL database running on a Windows 2000 server.
    We have used MyOLEDB driver(OLEDB) to link the mysql database.
    How can I access the data stored in a Linked server?

    Any help would be appreciated.
    Thanks!!

    this is our code¡G
    exec sp_addlinkedserver @server='OLEDB_test',
    @srvproduct=N'',
    @provider=N'MySQLProv',
    @datasrc=N'203.xx.xx.xx',
    @catalog = N'Store'

    exec sp_addlinkedsrvlogin 'OLEDB_test','false',null,'root',''

    select * from OLEDB_test.Store.root.Books
    or
    select * from OLEDB_test.Store..Books

    error message:
    Can't create OLE DB Provider 'MySQLProv' instance¡C
    OLE DB error trace [Non-interface error: CoCreate of DSO for MySQLProv returned 0x80040154]¡C


    by the way¡G
    1.We Create an ODBC System DSN that points to our MYSql server
    2.We use OLEDB for ODBC to create a linked server to mySQL
    3.We have got the query to work with openquery
    but we can't update¡Bdelete¡Bmodify the data stored in a Linked server

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    I am not sure whether there is a OLE DB provider for mySQL, but you can create a ODBC DSN and use OLE DB for ODBC to create the linked server.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •