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.
Printable View
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.
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.
How do you expect to use VB code in a Java based web applicaiton?
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.
i understand the comments part but i think i need a little help understanding the code itself.
Since BAsic is near English, what lines do you need help with ?
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 :(
Open App.Path & "\PaySQL.txt" For Append As #1
Print #1, SQLStmt
Close #1
??
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?
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):
I hope this gives you an idea about it ...:wave:Code:Filename= "C:\myapp\Transactions\py051910.txt
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. :(
Isn't it obvious from this line what it writes to the file: Print #1, SQLStmt ?
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.
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.
ok i get it all now. thanks :)