Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Xml web service
Message
From
24/05/2006 07:26:48
 
 
To
24/05/2006 05:37:10
General information
Forum:
Visual FoxPro
Category:
Web Services
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000
Network:
Windows NT
Database:
Oracle
Miscellaneous
Thread ID:
01124476
Message ID:
01124490
Views:
8
>PROCEDURE Updatedata(cXML1,cXML2,cXML3,cXML4,cXML5 AS String)&&
>   LOCAL oXMLAdapter AS XMLAdapter,ota as XMLTable
>   xx=1
>   oXMLAdapter=NEWOBJECT("XMLAdapter")
>   FOR i=1 TO 5
>       cxml='cxml'+ALLTRIM(STR(i))
>       oxmladapter.releasexml(.t.)
>       oXMLAdapter.LoadXML(&cXML,.F.)
>       FOR EACH ota IN oxmladapter.tables
>           IF ota.fields.count>0
>              ota.ToCursor()
>           ENDIF
>       next
>   NEXT
>   cconnectstring="Driver={Microsoft ODBC for Oracle};Server=prod80.chinanusa.local; Uid=sysadm;Pwd=eisprod"
>   nHandle = SQLstringCONNECT(cconnectstring)
>   sqlsetprop(nHandle,"Transactions",2)	
>   sqlsetprop(nHandle,"Asynchronous",.F.)
>   xx=2
>*DELETE Ps_demand_inv
>*update PICKING_PHYSICAL
>*update PICKING_RECEIVED
>*INSERT PICK_PLAN_PRINT08S
>*INSERT PICK_PLAN_PRINT09S
>   SELECT * FROM d:\picking\xmlwebservice WHERE type=='UPDATAPICK' INTO CURSOR pick_update
>   SELECT pick_update
>   GO top
>   DO WHILE NOT EOF()
>      SELECT pick_update
>      SCATTER memvar
>      CSQLCOMMAND=MCOMMAND75
>      CTName=ALLTRIM(disc)
>      SELECT &CTName
>      GO TOP
>      DO WHILE NOT EOF()
>         SCATTER memvar
>         xx=4
>         trimm(ctname)
>         IF SQLEXEC(NHANDLE,CSQLCOMMAND)<1
>            SQLROLLBACK(NHANDLE)
>            RETURN
>         ENDIF
>         SELECT &CTName
>         SKIP
>         IF EOF()
>            exit
>         endi
>      enddo
>      SELECT pick_update
>      SKIP
>      IF EOF()
>         EXIT
>      endif
>   enddo
>   xx=5
>   SQLCOMMIT(nhandle)
>   RELEASE oXMLAdapter,oCA
>ENDPROC
>
>procedure TrimM(Tablename as string)
>select &Tablename
>for i=1 to fcount()
>    varname='m.'+trim(field(i))
>    if type('&varname')=='C'
>       &varname=iif(empty(&varname),' ',alltrim(&varname))
>    endi
>endf
>endproc
>
>PROCEDURE Error(nError AS Integer,cMethod AS String,nLine AS Integer)
>  LOCAL cText AS String
>  cText=cMethod+" &#38169;&#35823;&#21495;="+LTRIM(STR(nError,5))+" &#34892;&#21495;="+LTRIM(STR(nLine,8));
>         +' '+ALLTRIM(STR(xx))+' '+MESSAGE()
>  COMRETURNERROR(cText,_VFP.ServerName)
>ENDPROC
>ENDDEFINE
>
>Can I use function Trimm()?
>when I compile it and published it.
>
>"SoapClient=CREATEOBJECT("MSSOAP.SoapClient30")
>oSoapClient.MSSoapInit("http://CONTSERVER/picking/pickingplan.WSDL")
>oSoapClient.Updatedata(cxml1,cxml2,cxml3,cxml4,cxml5)"
>this code in my program.
>when I run it ,It always show me ."no progarm file trimm"
>I don't know the reason,Who can tell me the reason ,thank you advaced.
>I'm not good at English.if you can't clear what I say.you may send me mail.
>my mail address is "lhg_ever@163.com"



TRIMM() is not a native FoxPro function. TRIM() is.
If you do have such a new function you must define it and compile it into the program.

Note: You must use < pre > HTML statements (without spaces) to properly present your code samples.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform