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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is this vb?

Status
Not open for further replies.

TheConeHead

Programmer
Aug 14, 2002
2,106
0
0
US
set rs = nothing

is this vb? if so- does anyone know the javascript equivilant?

Would it be:

rs = "";

or:

rs = null;
 
It is VB. But, unfortunately, I don't know the Javascript equivalent. BlackburnKL
 
Because of the ; at the end of the statement i dont think this is VB. It is either C, Java, or any variation. The single = sets the rs to the value and a == would compare it. Hope this helps.

Jack D
 
I presume this is script from a page? if so, I am guessing that rs is defined somewhere (probably) as a record set or data object, and the assignment (= nothing) is restoring it to an initialized (or empty) state. I also don't know the Java equivalent, but if my conjecture is correct, you should be able to track similar code for Java down fairly easily.
 
as BlackburnKL said

set rs=nothing

is a VB statement

although im not certain what this particular RS stands for, on all other occasions that i have seen it it has had something to do with linking to a database of some kind (maybe stands for record source... dont know,could be wrong) if it is being set to nothing then it is efectively being destroyed (the link that is)

sorry cant offer anymore!
 
set rs = nothing is definitely VB. It sets an object (probably an ADODB.recordset) to nothing, i.e. it destroys it.
In Javascript you'd have something like
rs = null;.
rs = ""; is not correct: this would apply to strings, but the word 'nothing' refers to an object - a string is not an object in VB.
 
If you are converting from vb script to java script I would just go ahead and leave this part out. Java garbage collection may handle it for you. As is already mentioned- it is just destroying the object so it does not hold on to any resources.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top