General information
Title:
Cannot update cursor in web service
When running a simple dll as a webservice getting a message in the XML web services in task pane, getting a cannot update cursor...it is READ-ONLY. I can run DLL as a COM server using the
lo= creatobject("xxxx.xxxxx")
lo.insertLead()
This works no problem. When I compile the project and register the dll as a webservice and try and test in the task pane XML mananger the table I am trying to update seems to be set as read only from the git go. Here is some code....
DEFINE CLASS ClassWebSvcMain AS SESSION OLEPUBLIC....
PROCEDURE INIT
SET EXCLUSIVE OFF
SET PROCEDURE TO wwUtils ADDITIVE
SET PROCEDURE TO wwAPI ADDITIVE
ENDPROC
PROTECTED PROCEDURE setEnv AS INTEGER
TRY
SET RESOURCE OFF
SET REPROCESS TO 2 SECONDS
SET CPDIALOG OFF
SET DELETE ON
SET EXACT OFF
SET SAFETY OFF
SET MULTILOCKS ON
loAPi = NEWOBJECT("wwAPI","wwapi.prg")
IF !USED("prospect")
SELECT 0
USE ADDBS(THIS.cClassDataPath) + "prospect" SHARED
ENDIF
IF !CURSORSETPROP("Buffering",3,"prospect")
THROW "Cannot buffer prospect table"
ENDIF
IF !ISTRANSACTABLE("prospect")
IF !MAKETRANSACTABLE("prospect")
THROW "Cannot make prospect table transactable"
ENDIF
ENDIF....................
PROTECTED PROCEDURE insertLeadData AS INTEGER
TRY
BEGIN TRANSACTION
SELECT prospect
INSERT INTO prospect (lastname,;
firstname);
VALUES(cTempLead.lastname,;
cTempLead.firstname)
IF !TABLEUPDATE(.T.,.F.,'prospect')
ROLLBACK
ELSE
END TRANSACTION
ENDIF
lnreturn = 1
CATCH TO poException
THIS.populateErrorArray()
lnreturn = 0
ENDTRY
RETURN lnreturn
ENDPROC
The line where the insert into is located is where the code blows up running as a webservice...HELP!!!!!
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only