Linked server to retrieve data from MYSQL XML Column

  • Hi

    I set up a linked server to MySQL database using @provider=N'MSDASQL etc

    The linked server string is

    EXEC master.dbo.sp_addlinkedserver

    @server = N'MySqLLinkedserver',

    @srvproduct=N'mysqldb', @provider=N'MSDASQL',

    @provstr=N'Driver={MySQL ODBC 3.51 Driver};

    Server=myserver.com;UID=myuser;PWD=mypassword;Database=mydatabase;Option=3;'

    The linked server is working fine . I can able to retirieve data and for all columns except xml column

    If i specify XML column in the query iam getting errors .Is body experienced this before and have a solution please let me know

    --- This query is fine ---

    select * from openquery(MySqLLinkedserver,'select id ,county from tblinfo')

    1 USA

    2 USA

    3 UK

    4 UK

    -----

    -- but this query gives an error---

    here info is xml column

    select * from openquery(MySqLLinkedserver,'select id ,county,info from tblinfo')

    Msg 0, Level 11, State 0, Line 0

    A severe error occurred on the current command. The results, if any, should be discarded.

    Msg 0, Level 20, State 0, Line 0

    A severe error occurred on the current command. The results, if any, should be discarded.

    even selecting a xml column also triggers same error

    select * from openquery(MySqLLinkedserver,'select info from tblinfo')

    Msg 0, Level 11, State 0, Line 0

    A severe error occurred on the current command. The results, if any, should be discarded.

    Msg 0, Level 20, State 0, Line 0

    A severe error occurred on the current command. The results, if any, should be discarded

    has anybody got solution please let me know

  • @server = N'MySqLLinkedserver',

    @srvproduct=N'mysqldb', @provider=N'MSDASQL',

    @provstr=N'Driver={MySQL ODBC 3.51 Driver};

    Server=myserver.com;UID=myuser;PWD=mypassword;Database=mydatabase;Option=3;'

    The problem has been solved -- by changing the option =8 which is required for reading big results

    Option=3 is not sufficient

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply