Results 1 to 15 of 15

Thread: decoding vb code

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2010
    Posts
    8

    decoding vb code

    hi i am making this web application using java. i encountered this vb code that i must use in making the said project, but i have no background on vb programming and i could really use some help translating this attached code. thanks in advance.
    Attached Files Attached Files

  2. #2
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: decoding vb code

    It looks like there is already an explanation in there. Anything with a ' starting that line is a comment. That tells you what it is doing.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  3. #3
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: decoding vb code

    How do you expect to use VB code in a Java based web applicaiton?

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2010
    Posts
    8

    Re: decoding vb code

    no no, i'm not going to use that vb file itself. the code i need is written in vb and i need to translate it to java.

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2010
    Posts
    8

    Re: decoding vb code

    i understand the comments part but i think i need a little help understanding the code itself.

  6. #6

  7. #7

    Thread Starter
    New Member
    Join Date
    May 2010
    Posts
    8

    Re: decoding vb code

    the part that creates the reference file. what should i write in it? im sorry if it's blurry and all, i haven't got the slightest thing understanding this

  8. #8
    Fanatic Member sessi4ml's Avatar
    Join Date
    Nov 2006
    Location
    Near San Francisco
    Posts
    958

    Re: decoding vb code

    Open App.Path & "\PaySQL.txt" For Append As #1
    Print #1, SQLStmt
    Close #1
    ??

  9. #9

    Thread Starter
    New Member
    Join Date
    May 2010
    Posts
    8

    Re: decoding vb code

    no not that one. im pertaining to what's to be written in this file : filename = App.Path & "\Transactions\py" & Format(Now, "mmddyy") & ".txt". have any idea?

  10. #10
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: decoding vb code

    App.Path --> Will returns the Application path. Eg: C:\myapp
    Format(Now, "mmddyy") --> Will return a formatted date in "mmddyy" format. Eg: 051910 which is May 19, 2010.

    So, the FileName will be holding a string like this (based on the example):
    Code:
    Filename= "C:\myapp\Transactions\py051910.txt
    I hope this gives you an idea about it ...

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  11. #11

    Thread Starter
    New Member
    Join Date
    May 2010
    Posts
    8

    Re: decoding vb code

    thanks , but i understand (and did) that already. do you have an idea about what i should put in that generated file itself? i mean, i see some parts that i assume, would be writing in the said file, but i don't get what i should write in it.

  12. #12
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: decoding vb code

    Isn't it obvious from this line what it writes to the file: Print #1, SQLStmt ?

  13. #13

    Thread Starter
    New Member
    Join Date
    May 2010
    Posts
    8

    Re: decoding vb code

    that's what it writes in the paysql.txt file, not in the App.Path & "\Transactions\py" & Format(Now, "mmddyy") & ".txt". im looking for the latter.

  14. #14
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: decoding vb code

    If you follow the app.path to filename variable, filename variable to fswrite, then that to

    fswrite.WriteLine (WriteText)

    you'd see. It's not that hard actually.

  15. #15

    Thread Starter
    New Member
    Join Date
    May 2010
    Posts
    8

    Re: decoding vb code

    ok i get it all now. thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width