Message
General information
Forum:
Visual FoxPro
Category:
Web Services
Miscellaneous
Thread ID:
01158842
Message ID:
01158850
Views:
15
Have you verified the user rights of the web server to the files you are attempting to update?

>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!!!!!
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Previous
Reply
Map
View