The FileWriteu function writes the specified item into the specified file on the MVSP Server and maintains the item lock.


Namespace: rocketsoftware.MVSP
Assembly: RocketMVSP (in RocketMVSP.dll)

Syntax

Visual Basic (Declaration)
Public Function FileWriteu( _ 
   ByVal filePath As String,  _ 
   ByVal itemId As String,  _ 
   ByVal itemBody As String _ 
) As Boolean
C#
public bool FileWriteu(
   string filePath,
   string itemId,
   string itemBody
)
C++
public:
 bool FileWriteu(
   String filePath,
   String itemId,
   String itemBody
) sealed 
J#
public bool FileWriteu(
   string filePath,
   string itemId,
   string itemBody
)
JScript
public  function FileWriteu(
   filePath : String,
   itemId : String,
   itemBody : String
) : bool

Parameters

filePath
is the name of the file that you wish to write the item to
itemId
is the Itemid that you wish to write
itemBody
is the item data

Return Value

True

Remarks

If the item could not be written then statuscode and statusmessage properties will be set with the correct error message number and text

Example connects and writes a record 100 to the CUSTOMERS file and maintains the lock

 Copy Code
 Dim returncode as boolean
 Dim mvsp as new rocketsoftware.MVSP.Pick
 Dim params as string = ""
 Dim itemid as string = ""
 Dim itembody as string = ""
 Dim am as string = chr(254)
 returncode = mvsp.Connect("localhost",9000,"dm","")
 If returncode = True then
    returncode = mvsp.Logto("MVDEMO","")
    If returncode = True then
       itemid = "100" ' Itemid
       itembody = "Lucky Computers" & am & am & am & am & am & "Fred Smith" & am & "Order Entry Clerk"
       returncode = mvsp.FileWriteu("CUSTOMERS", itemid, itembody)       
    End if
 End if
 returncode = mvsp.CloseConnection()
 

See Also