Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

linked server to mysql can show tables but not select from table

$
0
0

Hi everybody,
I have a question about linked servers.
my procedure is as follows:
I want to select data from mysql database through a linked server, I use a stored procedure that takes a query as parameter:
CREATE PROCEDURE [dbo]. [AQSPP] (@ p1 varchar (1000))
  AS
  BEGIN
  DECLARE @ SQL varchar (1000)
  SET @ SQL = @ p1
  EXEC (@ SQL) AT MYSQLALLADIN
  END
When I call the sp from asp.net and I give @p the value 'show tables' or 'show databases' it works very well, but when I select from table, I get the error "Query may be invalid!: Protocolfout in TDS stream"

Any help Would Be greatly appreciated.

 

Hicham.


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>