Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Collections (via Class Module as in VB) exist in ASP?

Status
Not open for further replies.

Karl Blessing

Programmer
Feb 25, 2000
2,936
US
I am at a point, where I have a VB project that I Created, but they would prefer to make it webaccesible, basically it was made for the web application, to open a constants.inc file and modify it constant, well on the application, the way I Achevied this was loading each row into a constant and marking them as Data or NoData rows.
data rows would be the ones where an = appeared in the row, and there wasnt a ' comment mark before the equal marking it as a valid constant=vaule line

then working with the collection, until I was ready to save back to the file(or not save, either way it's the user's choice)

I have steps A->B->C
A) Loading the file into a collection
I currently have an ASP throwing the file out at the screen by rows in a table, each marked as data/nodata, so I Was able to least read the file, and determine rows

B) Display Constants, as well as allow previewing of the constants (like color constants, fonts, etc)
this would be easier than VB, since these constants were written int the sense they'd be used by VBScript/ASP, and I didnt have to convert most of the string like I did with VB

C) Saving back to a file from the collection stored.

The main benefit with the collection is that , I can keep all the rows of my file, also spliting them down into Variable/Vaulue/NoData/NoDataStr

also in the collection the keyname for a non-data row is the rownumber, the keyname for a data row is the variable name, so in the program if I needed to get it's beginning constant, or to change that row, I simple did
[tt]
set temprow = SetFile.row("Variablename")
[/tt]

then make changes to that temprow, so If possible to do collections in ASP (and session them off) it would really make this task much easier. [sig]<p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
[/sig]
 
Hmm I was thinking that, but wasnt sure if they're may be an easier way to go. [sig]<p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
[/sig]
 
Actually, not only is it easier, since debugging a VB module is far more convenient than debugging ASP VBscript, your code will actually run much faster using a component. [sig]<p>nick bulka<br><a href=mailto: > </a><br><a href= </a><br>Get your technical books at Bulka's Books<br>
[/sig]
 
true, but there were two reasons I Actually wanted to try an ASP-Only solution

1) to avoid registering any more dlls onto the server, as it woudld mean more to distribute(in terms whenever we sell the ASP application)

2) Superiors dont often like Mix of many technologies, but I like it. And as long as its serverside (like I'm doing) they dont complain much.

But thanks on your clarification, I've already moved stuff over to the dll, basically it only has four functions right now.

LoadIntoCol(Filename...)
ChangeVarInCol(Varname,VarValue)
CleanCol
WriteCollection(Filename...)

I'll just need to throw some properties/functions in so the ASP can get the list of constants to display. Also another post you might want to look at that ties in with this, is in the ACtiveX section of the VB forum, I'm asking about how to do something like MyDll(&quot;KeyName&quot;).Value, something like that.

thanks again.
[sig]<p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top