Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am getting value from this server
SQL
select *from OPENROWSET('SQLNCLI',
'server=abc.xxx.x.xx;Uid=xyz;Pwd=#####;
database=[db];
Persist Security Info=False',
'select * from AlahlidbN.dbo.mstudent') as GetContractFromERP
where GetContractFromERP.IsSent=0 


Now i want to transfer records to Mysql stored procedure through linked server in MSSQL server
I am using like this.

What I have tried:

SQL
select *from OPENROWSET('SQLNCLI',
'server=abc.xxx.x.xx;Uid=xyz;Pwd=#####;
database=[db];
Persist Security Info=False',
'select * from AlahlidbN.dbo.mstudent') as GetContractFromERP
where GetContractFromERP.IsSent=0 

Exec  ('call mobileapp.sp_GetStudentContractFromERP('''''+GetContractFromERP.stdID+''',"GetContractFromERP.type","GetContractFromERP.text","GetContractFromERP.Msg","GetContractFromERP.show","GetContractFromERP.StdOne")') 
at LINKED 
Posted
Updated 5-Oct-19 3:49am
Comments
[no name] 5-Oct-19 9:45am    
Seems like a separate program that talked to both databases at the same time would be the more logical approach.

1 solution

Seems like a separate program that talked to both databases at the same time would be the more logical approach.

Or again, stick the updates in a table, "import" that table, then process it on the receiving server.

You're dealing with 2 different platforms; don't bind them tightly.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900