Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot update cursor in web service
Message
From
03/10/2006 09:22:27
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Web Services
Miscellaneous
Thread ID:
01158842
Message ID:
01158851
Views:
18
>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!!!!!

Scott,
Does it have readwrite access to tables? AFAIK it's web user IUSR_machinename trying to access your table.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform