Scripting Dictionary And User Defined Objects
ok - this works:
Dim X
X = CreateObject("Scripting.Dictionary")
X.add 1, "Hello"
This doesn't....
Dim X
X = CreateObject("Scripting.Dictionary")
Class Aprivate VEnd Class
Dim B
B = new A
X.add 1, B
Can anyone tell me how to make this work?
View Replies
ADVERTISEMENT
How does one create user-defined objects in ASP? Sorta like the response and request objects, where you can do response.write, etc.
I'd like to create my own object called Customer, so I could do Customer.firstName, Customer.lastName, customer.age, etc. I couldn't find any helpful info on this topic on the Internet or in my ASP books.
View Replies
View Related
I'm trying to use the Scripting.Dictionary. However the item I'm adding to the dictionary is an array. An example is
Set objD = CreateObject("Scripting.Dictionary")
objD.Add "Key1", Array(1,2,3,4,5)
I know for sure the array always has 5 items. In VBScript, I can access the item like this:
objD.item("Key1")(1) to objD.item("Key1")(5)
View Replies
View Related
I have a problem with the Scripting.Dictionary in ASP.
All my data is entered into my Dictionary with no order and I would like to order them alphabeticaly and I don't know how to do.
View Replies
View Related
i'm trying to page through the items in the Dictionary, i've got a great example on it, but the way my class and dictionary is set up won't allow me to use the example Code:
View Replies
View Related
I'm having problems with an array of dictionary objects. It is being used to organize an SQL catalog set up with an ID/ParentID scheme. The script uses recursive functions to return the children categories, and works fine except for storing the info in the array of dictionary objects.
The UBound of the array is correct, and the very last index (93) to the array seems to have the correct dictionary object, but all the previous (0-92) come up with "Object Required:" error. By the way, dicRecords is another array of dictionary objects taken from a recordset. Any ideas? Code:
View Replies
View Related
Ok, first I had a problem with that error code: 0x80020009, but this article
http://support.microsoft.com/defaul...b;EN-US;q175239 fixed that. I'm saying this
because it might still have an impact..... I don't know.
I'm using scripting.dictionary for my webshop, so I'm putting the scripting object in a session variable.
So you can order three types of things, and I have one page that lists your shopping cart before checkout.
When I display only one of the three types (ie delete the rest from the file) it's all good. when I try to display them all, stuff just dissapears. If it wasn't for the fact that it works with one type, I would have thought it was something with some of the if syntaxes. Code:
View Replies
View Related
i am trying to create a dictionary object, i have written the code as..
Set objSD = CreateObject("Scripting.Dictionary")
but its giving the error as Library not registered.
help me with code for the same.
View Replies
View Related
I have been trying to read values from a form into an array on a page without much success and was told to use a Scripting.Dictionary instead.
There are a variable number of fields on the form as it is different according to which product is ordered (as are the fields that are used to create the record.) Code:
View Replies
View Related
I have to Execute a User Defined function from ASP page and also the function returns a varchar. Could someone help me out with the code for this.
View Replies
View Related
I need someone to point me in the right direction. I would search, but I am not certain what I neen to search for. Here is what I want to do.
My Intranet homepage has four content-blocks of information. Each content-block has specific type of information (i.e. HR stuff or international stuff).
I'd like to add more of these content-blocks an give our employees the option of choosing which four they want to see.
Most portal technology offers this, such as My Yahoo. What kind of technology do I need to look into? Cookies? Are there any scripts that I can use to assist with this?
View Replies
View Related
This is my user-defined class
class ABC
public CC
end class
I make a instance of it and store it at the session
set ee=new ABC
ee.CC="hi"
set Session("myobject")=ee
But when i retrieve it and access the property of my
object, it said that The object does not support this
property or method, is that ASP cannot do this, or my
code has error?
set eee=Session("myobject")
response.write eee.cc
View Replies
View Related
I am looking to personalize my Intranet homepage were the user has the information they want on their page.
For example all their fav sites on the homepage, like the news headlines, email account already open for them, any suggestions of how to start or the best possible recources to use.
View Replies
View Related
I am trying to get the list of all user defined tables from the Access database. If I use the following query in Access it's working fine and getting the result. But if I am trying to execute the query in ASP page, it's not working. I am getting an error ([Microsoft][ODBC Microsoft Access Driver] Record(s) cannot be read; no read permission on 'MSysObjects'.)
Can u please tell me the reason.
SELECT MSysObjects.Name AS TableName
FROM MSysObjects
WHERE (((MSysObjects.Type)=1)
AND ((MSysObjects.Flags)=0));
If you have anything, to extract user defined tables, please tell me. Either one works out for me.
View Replies
View Related
I'm forced to use legacy ASP for a new project i am working on and seeing as how I never use ASP I needed a little help with something.
I need to create a function with optional parameters. I know in .Net I can use the "optional" keyword in the function definition to create optional parameters. can this be done in ASP 3?
View Replies
View Related
I've read that one shouldn't include ADO objects in the Global.asa for the sake of performance, but would user-defined classes cause the same kind of performance hit? Assuming that they wouldn't, is it possible to do it?
I can't seem to figure out how to include them, nor find any reference to it in msdn.
Is there a way to do this? Or should I create a slew of Session variables? Code:
View Replies
View Related
How to get/set and send the HTTP Headers(user-defined) coming from another domain/site]
In one SMS gateway project i need a great and urgent help from u all. There,the Service Providers sending the data thru "HTTP Headers" (For ex.sms-Id,sms-source [user defined]).
So i need to get and parse the name value pairs, and need to respond/send the same way as coining the "HTTP Headers" (For ex. sms-Id,sms-destination,sms-msg [user defined]).
View Replies
View Related
How can I give a user-defined object session scope? From
http://www.microsoft.com/windows200...asp/iiwaobu.htm
I gather that it can be done, but there are no examples. Simply setting
Set Session("tag") = new MyClass
doesn't work.
View Replies
View Related
Is there a way to dynamically add drill down lists and input boxes to the HTML page. For example if the user clicks in a button it adds a new line contains one drilldown list + two input text boxes?
View Replies
View Related
Here's what I want to do.I've displayed records from the Db to a page called Inns.asp.
Among those records are COUNTY, CITY, STATE, ZIPCODE.
I created four asp pages called CountyInns, CityInns, StateInns, and ZipcodeInns.
They all display respective records with links to a redirect page. That's where I get stuck.If I have 50 records, say, displayed, i.e., COUNTY, how can I run a script against all the possible counties, without having to write a script for each and every city within that county?I do things somewhat differently, because this stuff is too tricky for me. It doesn't come easy but I usually get it right after a lot of help and attention. I bet there are other ways to do this but i'm not sure I can learn it any other way than the way I do it. Inns goes to CountyInns which leads to CountyInnsRedirect which (hopefully)contains a script for individual County display.
View Replies
View Related
I am processing a form and I want to double check that a field is defined so that no error occurs. How do I check if a key exists in a collection (the Request.Form collection)?I do not want to process all of the fields in the form, so I do not want to use "For Each x In Request.Form". I process a certain list of fields and just in case the field was left out, I want to prevent an error from occurring from trying to use a key that does not exist.
Code:
For Each x In arrayFields 'arrayFields contains certain field names
'verify that field actually defined
If [field is a key in the Request.Form collection] Then
stringTemp = Request.Form(x)
'do stuff
End If
Next
View Replies
View Related
I'm having trouble with checking if a variable is defined. It is the conidtional statement of an IF statement.Ex.
IF var is defined then
action
else
action
ENDIF
View Replies
View Related
The site is for subscribers only. The frontpage is open to everyone, but when one clicks a link on the frontpage, the visitor is redirected to a login form. The code that processes the form checks the username and password. If they match, a session variable is set and the browser is forwarded to the link clicked in the first place.
Now, I want to make a addition: When a user that is not logged in clicks on a link on the frontpage, before the login form is shown, I want to compare the browser ip address to a list with subscriber ip addresses. If the browser ip is in that list, the login form should not be shown. Instead should the session variable be set and the browser forwarded to the article requested. Code:
View Replies
View Related
I am using aspload to allow users to upload three files - 2 pics and a word
doc. The files have standard names but I want the user to define the name of
the folder.
Is there and efficient way to make sure that the user does not choose
illegal characters for folder names? I am doing a series of replaces at the
moment.
View Replies
View Related
I'm getting the following compilation error on the line of vb.net code below. Compiler Error Message: BC30002: Type 'DirectoryEntry' is not defined. Dim dirEntry As new DirectoryEntry(strLDAPPath)
I have System.DirectoryServices added to the project references and to the aspx form. The autogenerated code includes "Imports System.DirectoryServices" in the source. Any idea what's need to get the compiler to see the reference?
View Replies
View Related
I have a pop-up window with a search button. If click on this button then a record list is made on this pop-up window. Each record have field with a href link. If you click on the href link next function is executed: Code:
View Replies
View Related
I have a project where I want an email to be sent at a certain time, say 10 PM every night if there are new hits to my site. The email will be only going to my email address. does any one know of a way to do this?
View Replies
View Related
if I have some system defined variable in my table column, say I am using a column called Default which is bit type. Its enclosed in square braces like this [Default]. Whenever I try to modify a record, it returns the following error :
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'Default'.
/performaindia/maint/logtype.asp, line 170
in line 170 its
rs.Update
Any hints where to make the changes.
View Replies
View Related
I use the following code in developing a web application with ASP. But after viewing in browser, it told me "Error: 'WScript' hasn't been defined".
the following code:
<script language="JScript" >
function funGetSleep()
{
//to sleep 1 min
WScript.Sleep(60000);
alert("it is ok");
}
</script> .
View Replies
View Related
I am working on a project which
used dictionaries. I am having
to remake part of this and have
no experience with the
scripting dictionary.
I need to see how to create multiple
dictionaries within one dictionary.
Can someone point me to some
reading materials on this where I
might see an example as well?
View Replies
View Related
for debugging purposes, I am wondering if it is possible to have an ASP script that:
-creates a tabel with two columns
-writes a var name in the first column
-writes its value in the second column
is this possible? Right now, I have manually created this tabel for myself, but everytime a new var is defined, I have to update my 'debug' table. Can this be automated?
View Replies
View Related
Just wondering the best way of doing this? are there any dictionary databases laying around somewhere?
I want to change my search so that it corrects typo's and maybe suggests better words to search with... like googles but with more alternative words to make the search more useful - slightly limited so it doesn't become pages and pages of search terms.
What I don't want to do is sit down in front of my computer and type all of this in, going through related words and possible other searches / best searches from the given input.
View Replies
View Related
While pouring over some code I've discovered a previous developer heavily
uses the "dictionary" object. Whilst I see some of the advantages of using
this system It's something I've not used myself so am not sure of the
limitations.
We are about to widen the scope of the website it's being used on to a
WorldWide system - greatly increasing the number of users that will be using
the website.
What I'd like to know is are there any performance issues with using this on
a heavily used site?
View Replies
View Related