Incorrect syntax with OPENDATASOURCE in Sql server -


i stuck @ passing parameter opendatasource , got error message:

msg 102, incorrect syntax near 'sqlncli'

----@connectionstring passing ui

 if exists(select cm.customerid [customer id] cardmaster cm inner join customertail ct             on cm.customerid = ct.customerid             inner join opendatasource(sqlncli, @connectionstring).mercfuelprod.dbo.customer cr              on cm.customerid = cr.custid cm.cardnumber = @cardnumber) -         begin             set @result = 'success'         end     else 

pleas me problem.

you have pass string:

opendatasource('sqlncli'... 

https://msdn.microsoft.com/en-us/library/ms179856.aspx

also have dash before begin keyword...


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -