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


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

Syntax

Visual Basic (Declaration)
Public Function FileWritevu( _ 
   ByVal filePath As String,  _ 
   ByVal itemId As String,  _ 
   ByVal attributeBody As String,  _ 
   ByVal attribute As Integer _ 
) As Boolean
C#
public bool FileWritevu(
   string filePath,
   string itemId,
   string attributeBody,
   int attribute
)
C++
public:
 bool FileWritevu(
   String filePath,
   String itemId,
   String attributeBody,
   int attribute
) sealed 
J#
public bool FileWritevu(
   string filePath,
   string itemId,
   string attributeBody,
   int attribute
)
JScript
public  function FileWritevu(
   filePath : String,
   itemId : String,
   attributeBody : String,
   attribute : int
) : 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
attributeBody
is the item data
attribute
is the attribute number to update

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

 Copy Code
 Dim returncode as boolean
 Dim mvsp as new rocketsoftware.MVSP.Pick
 Dim params as string = ""
 Dim itemid as string = ""
 Dim attbody 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
       attbody = "New York"
       returncode = mvsp.FileWritevu("CUSTOMERS", itemid, attbody,3)       
    End if
 End if
 returncode = mvsp.CloseConnection()
 

See Also