I need to update my SQL server data from my foxpro9 cursor. I made a code in my program, but it is not working.
This is how I used my code,
My SQL server table is MIS.dbo.wshPara and my foxpro9 cursor is Wash.
Can someone please help m to do this?
Thanl you.
This is how I used my code,
Code:
stra="select nParaID, cParaNo, cParaYear, cParaCD from MIS.dbo.wshPara WHERE cParaCD=?thisform.cboFactory.value+'c'"
SQLEXEC(hndOps,stra,'wshPara')
SELECT * FROM wshPara INTO Dbf C:\TEMPFILES\wsh_Fac
SELECT nParaID,val(cParaNo)+1 AS nParaNo ,cParaYear, cParaCD FROM wsh_Fac INTO Dbf C:\TEMPFILES\wsh_Fac2
SELECT nParaID,str(nParaNo) as cParaNo,cParaYear, cParaCD FROM wsh_Fac2 INTO Dbf C:\TEMPFILES\wash_factory
SELECT nParaID,str(nParaNo) as cParaNo,cParaYear, cParaCD FROM wsh_Fac2 INTO CURSOR Wash
Update MIS.dbo.wshPara Set cParaNo= t2.cParaNo From wash_factory as t1 Inner Join MIS.dbo.wshPara as t2 On t1.nParaID= t2.nParaID
My SQL server table is MIS.dbo.wshPara and my foxpro9 cursor is Wash.
Can someone please help m to do this?
Thanl you.