Dynamic ASP Local Variables...
I'd like to create a series of variables created dynamically, example such
as this...
For i = 1 to 5
TheVariable & i = "blah"
Next
This would during the first loop create a variable called 'TheVariable1'
with a value of 'blah'. Is this possible as so far I'm getting syntax
errors?
View Replies
ADVERTISEMENT
I have created a nice funky 500 - 100 error page which gives a nicer error; happily loops through and supplies querysting information, all headers, server variables..etc but it has a limitation. On a normal error page you can always use a response.write then
response.end to look a the value of a local variable.
What I would LOVE would be to be able to loop through all the local variables (not
form or querystring, they're sorted) on the previous page and display their values so a developer would see the complete state of the page on the error page without having to use any on error statements. Has anyone achieved this, I can't think of a way at all.
View Replies
View Related
Is there a way to create dynamic variables when looping through a recordset? For example below, after the 1st loop I'd have myVarA1 and myVarB1, after 2nd loop, I'd get myVarA2 and myVarB2.
CODE ***********************************
set objRS = GetMyRecordSet()
i=1
objRS.MoveFirst
Do While Not objRS.EOF
"myVarA" & i = objRS(0)
"myVarB" & i = objRS(1)
i = i + 1
objRS.MoveNext()
Loop
View Replies
View Related
What's the correct syntax here:
(given the recordset myRS with x records
do until myRS.EOF
txtvar & myRS("serial_number") = myRS("serial_name")
myRS.movenext
loop
..asp will not build the dynamic variables
txtvar1 = "Some name"
txtvar2 = "Any name"
txtvar3 = "Your name"
.....
Based on the serial_number in the current recordset.How can I builde the dynamic variables, and give them a value from my recordset?
View Replies
View Related
I have a spare parts database that I am working on. All that needs to be stored is the part description, what it goes to, and the quantity in stock.
Since that's all that I need, I want to be able to allow the user to edit the quantity right on the results page, through a textbox. Just change the number in the textbox for each part, press the button, and voila, it's all saved to the database (and is redisplayed for your convenience.)
However, there is no set amount of part rows. Right now, I'm creating the text boxes using the id of the item (i.e., name="quantity<%=RS("partID")%>"), but I'm not certain how to call the variables to put in an insert.
What is the syntax for dynamic/variable variables (if they even exist in ASP)?
View Replies
View Related
i have a website that uses (or needs to use) dynamically driven dropdowns using asp & JS on all pages. it contains 3 different dropdowns that are DB fed and are dependent upon the value of each other. the drop down values are updated using a repost to itself.
they work perfectly on the initial pages where no other variables are involved, but i am having troubles on the pages where more variables are being sent. eg: i have use a lot of error checking, and when i repost, the variables are deleted, and thus the error listings take effect as the variables are now blank. can i refresh the dropdowns without repossting to the samepage without effecting the existing variables on that page? sessions? cookies?
View Replies
View Related
I code that creates a calendar for each month and then it displays events from that month that are stored in a db. I need to loop through my recordset and display all the events, but I can't quite figure out how to do it. I am thinking I need to do an array. But I am not really sure.... any ideas. Here is where you can view the calendar. Code:
View Replies
View Related
Is there anyway I can get the information about a file on the local machine of a user that is reading pages from my web site? Scripting.FileSystemObject does not have permission to do this, and I want to check the size of a file before I try to get it uploaded.
View Replies
View Related
An application runs on server, and is used for Hour-registration. Now I want to run the application local, I use SQL Server 2005, and managed to fix connection changes.
But now, I get this error everytime I run the application:
Microsoft VBScript runtime error
Error Code :0x800A01CA
Error source :
Error Description :Variable uses an Automation type not supported in VBScript
Any solution please?
View Replies
View Related
The webserver I'm using (which I can't make any changes to) has a
Dutch-localsettings. When doing simple calculations the decimal-symbol in
ASP is a , (komma). Is it possible to force IIS to use a . as decimal symbol
by code? (IIS5)
View Replies
View Related
I would like to evaluate some shopping cart software to use on my next project. I am new to asp and as yet my hosting does not support it. Before I go ahead and upgrade my hosting I wanted to see how the various packages work.
I am running XP Pro SP2 and have installed IIS. The folders seem to be where they should be and I have access to the settings through the Administrative Tools.
When I put a htm file in the wwwroot folder it loads fine if I type http://localhost but the asp files are either downloaded or opened in dreamweaver.
Do I need to do something special to enable asp files to open on my local machine??
View Replies
View Related
I'm not a networking/IT guy, but I was put in charge of figuring out how to use ASP to tap into an Oracle db for my office. I am using a windows 2000 laptop, and I want to be able to run ASP code on my local desktop (without being plugged into a network).
I need a lot of help here. I know I have to turn my computer into a webserver, but I'm not certain what I need to do with the IIS. What do I need to do in general to make my computer a webserver? In addition, I will be using a local Oracle database. So I wasn't sure what I would need to do to make that db available for querying with ASP. What is the best way to make that connection?
Anyone who can point me to useful documentation.
View Replies
View Related
I am running this code on my local IIS and everything works fine. The code detects the file I select using the INPUT TYPE=FILE. The problem is that when I move this code up to my host’s web server, it never works as in it never finds the file. It is the exact same code so why is it working on my local IIS but not on the web server? It is ASP code.
Code:
set fso = createobject("Scripting.FileSystemObject")
If fso.FileExists (strValue) then
'File exists continue with code
Else
Response.Redirect("aspError.asp")
End if
View Replies
View Related
I need to setup my home computer to view ASP files like I veiw PHP files through Apache2Triad or some other similar installer package.
I'm using Windows XP Home,is this possible?
View Replies
View Related
I am trying to set up an internet page on our intranet that contains logoff/shutdown and restart buttons.This needs to work in a remote desktop situation which rules out various options.
Next stage is to call this .exe from a webpage...which I'm struggling with. My test code (to test a reboot) is below but doesn't seem to work. Can anyone help remembering this needs .exe needs to run on the local machine and not the server.
View Replies
View Related
I have a computer running Windows XP home edition and i would like to have a local web server for testing my classic asp pages.
View Replies
View Related
How do I execute a users program from a web page? When a user goes to a webpage - I want a link on that page that will execute a program on the users local hard drive - like say...notepad.exe . Everything I have tried will only execute it on the server.
View Replies
View Related
have an SQL DB which clients access via asp pages through the internet, in the case of a power outage I need to write that data automatically in the background to a txt file on their local machine, I would imagine it would involve a script of some kind.
View Replies
View Related
is anybody know how to capture lan id(localhost id ) address in lan. u can check the same under dos using command ipconfig. but i am not geting the same id using bewlo code
<% Response.Write Request.ServerVariables("REMOTE_ADDR") %>
View Replies
View Related
how to get TimeZoneId for Local TimeZone.
View Replies
View Related
i'd like to know if it is possible with asp to launch a local application (exe file like word or any else).
View Replies
View Related
can anyone tell me difference between environment variables and server variables.
View Replies
View Related
I am wondering if their is a strategy or tool for syncing a local
database with a web-based database? Specifically I have an application
where orders are entered via a web form and the data emailed to my
client who processes the orders. I extract the order information and
update a local "order tracking" database. There are several order
processing steps.
I want to update a web database to reflect the status
of the order as it flows through the local tracking application. I will
send an email to the "orderer" at the major steps, but my client wants
to have a web-based report shows the status of all orders for a company
that has pending orders. In other words a company will enter multiple
orders and will be able to track the status of the orders by signing on
to the web site.
This status report gets its data from the
web-database.....which I must update from the local tracking database.
A pretty long winded explation which I hope mades sense. Has anyone
found a solution to this problem? Any reference or tools you can
suggest?
View Replies
View Related
While I know within visual studio express 2005 it's easy enough to test and connect to SQL Express 2005 database's I ask can standard ASP connect to this also? I will be attempting from localhost IIS as obviously visual stuido does not host ASP sites.
View Replies
View Related
1. I need to convert the local-time of the server on which I run my website
to UTC and I don't want to rely on the server local time and timezone (i.e.
I don't want to hardcode the timezone information), is there a generic way
to do this?
2. Is there a general for converting time between timezones in ASP?
View Replies
View Related
Am I now setup to view .asp on my local machine, or do I have to "upload" the pages to IIS? If the latter, how do I do this?
View Replies
View Related
How do I allow users to browse their local machine and upload a file to the server? I'm looking for the pop up window that allows the user to search for a file in their local machine. Also, once the file is in the server and the user needs to delete it, how do I do that?
View Replies
View Related
I have been teaching myself ASP for several months now and seem to have a pretty good handle on it. All along, I have been uploading changed files directly to the website and refreshing to test.
However, today I will be at a location with no internet access and would still like to be able to work and test my programming. How do I go about testing ASP pages on my local computer without an internet connection?
For now I am not worried about testing any databases or anything, just layout and design.
If it is useful, I am running Windows XP Home edition and I use Dreamweaver to write the ASP.
View Replies
View Related
I made a image upload a while ago, but too many people submits too large images (this is no problem, since ASP Upload won't upload too large images) but people gets frustrated when their images are not uploaded!I want to do so that you can't submit the form if the pictures are too large. I was thinking of doing a asp functions to check the file size and then pass the result to a javascript function, which will then alert the user and denie him to submit the images.I know how to do the javascript part, but I don't know how to check a local file's size with asp? I'd appreciate if someone could help me! Thanks.
View Replies
View Related
I copied one of our websites to a CD and wanted to run the website off of the CD. However, it won't run the index.asp on Windows XP machine. Do I need to install some dll's or something?
View Replies
View Related
What is the best way to set up a server with MSSQL on your local machine. I have IIS set up, and am wondering if there is some way to get MSSQL for testing purposes for a reduced cost? From what I understand, a typical MSSQL license is around $8,000, am I right
View Replies
View Related
I took over an ASP site and am having trouble uploading pics through the user interface. I get the following message:
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object: 'SoftArtisans.FileUp'
/admin/UPLImage.asp, line 15
The line refered to by the message states:
upl.Path = "d:htmlusersusernamewebsite.comImagespages"
View Replies
View Related
i am developing an intranet area where my boss says he wants the logon to be related to the local accounts,if no local account exist then they will be refused access, i am a little lost with this.
View Replies
View Related