Locked RSet Function in Visual Studio

  • Thursday, July 26, 2012 8:41 PM
     
     

    I am converting some code from Access vba to Visual Studio 2010. In Access VBA i used the LSet and RSet functions to right/left align a string when it was written to the database. But I get an error on those lines when I attempt it in VS 2010. What is the equivalent command for VS 2010? Thanks.

    LSet(ColumnA = Trim(Mid(FileRec, 1, 20)))

    RSet(ColumnB = FormatNumber(Mid(FileRec, 21, 9), 0))

    RSet(ColumnC = FormatNumber(Mid(FileRec, 32, 8), 0))

    RSet(ColumnD = FormatNumber(Mid(FileRec, 42, 8), 0))

All Replies

  • Friday, July 27, 2012 7:14 AM
     
     

    Hi,

    Which is the target language for this conversion? VB or C#?

    Also, as far as I know, both LSet and RSet function take two required parameters. I doubt that the vba code you provided can work properly.

    Thanks.