I have an SQL database that tracks workorders for my company. Each workorder is ID'ed by a number, i.e.: 1234. The next would be 1235, 1236, etc. I need a loop to go through EVERY workorder in the database.
How do I set a variable = to the largest WorkorderID in the database? i.e.: That would be 1500 if there were 1500 workorders in the database. Don't worry, there are other checks in place so that it won't always loop through every single workorder (I thought about that already).
I Have a form, and in that form I have a check box, I wish to say " If Checkbox is checked Then variable = true Else Variable = false". Here is what I have as far as code goes...
Thus far the variable is always false, leading me to believe that my syntax is wrong. All the SQL part of this is tested as working (Included to give a perspective on what I am trying to do) so you can for the most part ignore it. It is the form part that has a problem. Code:
I'm trying to calculate the total time using values from database I run a select statement to find the timein column in my database.
Now how do i assign the result to a variable so that it can be used? There is only going to be one result because i'm checking it against an autonumber field. that is used as time 1. Code:
I've got two variables: currentPage = the current page number being viewed nPages = the total number of pages
After navigating my site to the last page, these two numbers are the same, yet when I compare them with
if currentPage=nPages then (execute true statement) else (execute false statement) end if
the true statement never happens. I have printed the values of each variable just prior to the conditional and verified that they are the same. The only thing I can think of is maybe they are somehow different variable types or one has a decimal value I'm not seeing. Any ideas?
I m using front page.I have used some button and value of all button is different so its width show different.I want to equal width of all buttons.I dont want to use link button.
I need to make a text field equal to the entered value. Example: First time to the page nothing will show up in the field because nothing was entered. I enter a value and submit the form. The redirect is to the same page to add new inforation but this time the value entered in that one text field will be there. I tried <%=Request.Form("box")%as the value of the text field but to no success.
I m using front page. I have used some button and value of all button is different so its width show different. I want to equal width of all buttons. I dont want to use link button.
I'm using Windows 2000 server n IIS I'm Using FileSystemObject of ASP in Server Every File and Folder has 2 Size when we get properties of any 1 actual size and Size on Disk.now my problem is when i get the file size from ASP object it give Size value but when i try to get folder size it gives size on disk and both values are different.
I'm creating a size to access limited size to upload files so i just check the folder size and then get size for those which are going to update by user then i will less those size to actual folder size to get remaining size.
I m using front page. I have used some button and value of all button is different so its width show different. I want to equal width of all buttons. I dont want to use link button.
I m using front page. I have used some button and value of all button is different so its width show different. I want to equal width of all buttons. I dont want to use link button.
how can I get size a file from any sites. http://www.domain.com/fileblablabla.zip I want to know what the size of file is by using ASP.. is there any way ? or is there any free component ? (But it must cancel immediatily after getting the size of file.. because maybe its size can be 50 Mb
I am using variable passing through the url, and as it is getting larger, I am finding that occassionally some values are getting trimmed. Is there a limit to how long a url can be?
how can I get different font size in the form method "select", "input" instructions working under ASP? because when I check with the browser is too big in the table.
I am having a problem with this code. The problem I am facing is that the first image is displayed in its original size. But when I click the next button, the next image not displayed in its original size, but being displayed as 100 x 100 pixels, same goes to the 3rd picture and so on. Code:
I only need to know the height and width of the image.
It doesn't seem to be as easy as php's "getimagesize($imgFile);" method.
<% 'Copyright *c* MM, Mike Shaffer 'ALL RIGHTS RESERVED WORLDWIDE 'Permission is granted to use this code 'in your projects, as long as this blah 'copyright notice is included
function GetBytes(flnm, offset, bytes) Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFTemp = objFSO.GetFile(flnm) lngSize = objFTemp.Size set objFTemp = nothing
Set objTextStream = objFSO.OpenTextFile(flnm,1) strBuff = objTextStream.Read(offset - 1) GetBytes = objTextStream.Read(bytes) objTextStream.Close set objTextStream = nothing set objFSO = nothing end function
function lngConvert(strTemp) lngConvert = clng(asc(left(strTemp, 1)) + ((asc(right(strTemp, 1)) * 256))) end function function lngConvert2(strTemp) lngConvert2 = clng(asc(right(strTemp, 1)) + ((asc(left(strTemp, 1)) * 256))) end function
function gfxSpex(flnm, width, height) fileT=split(flnm,".") if fileT(1)="gif" then Width = lngConvert(GetBytes(flnm, 7, 2)) Height = lngConvert(GetBytes(flnm, 9, 2)) elseif fileT(1)="bmp" then Width = lngConvert(GetBytes(flnm, 19, 2)) Height = lngConvert(GetBytes(flnm, 23, 2)) elseif fileT(1)="png" then Width = lngConvert2(GetBytes(flnm, 19, 2)) Height = lngConvert2(GetBytes(flnm, 23, 2)) end if gfxSpex=true end function
if gfxSpex("images/urlogo.gif", w, h) = true then response.write w & " x " & h end if %>
Which is a little bit shorter, and seems to work ok so far, but isn't there anything easier, like php's "getimagesize($imgFile);"?
I have a drop-down with 40 option values and only one option should be selected of the 40 options. The list size should be 1.
When I click on the list, it drops down 30 options (a very long list) with a scrollbar for the last 10 options.
Is there any way, when I click on the list it drops down only 5 options (as if the list is of size 5) and allow a scrollbar to browse the remaining 35 options.
Code is: <select name="deplist" id="deplist" <option value="Commerce">Commerce</option> <option value="Instru">Instrumentation</option> ... similar such 38 options </select>
I need a general code for limiting an image size in pixels.Uploaded Images from people may not be larger on width than 400 px. If so than a script would minimize them to 400 but if they are 260 px then they of course appear in 260 px
How do I find out the size of a file. I can get listing of files in a directory but I cannot figure out how to get the file size also.
Here is what I have so far. <% Set MyDirectory=Server.CreateObject("Scripting.FileSystemObject") Set MyFiles=MyDirectory.GetFolder(Server.MapPath("test")) For each filefound in MyFiles.files Response.Write filefound.Name & "<br>" Next %>
I don't have any books for reference here. Can someone point out a good online source?
i have a page that displays an image. the image path is a variable passed in the url link. eg. enlarge.asp?picture=http://www.hey/.com/you.jpg and the window it opens works. but id like to try and get the enlarge as to get the height and width dimentions so i can call a new window to opena popup and ill dynamically have the images dimentions to scale the popup to fit. and right after the javascript calls a new popup window itll use a close window function. and since it happens before the head tags it should be seamless as if i had a regular link calling a popup.
I have these two tables in a SQL database. i.e. tbl_A and tbl_B I need to create an ASP page that will tell me the size of each table and then the combined size of both tables.How do I accomplish this?
I have a variable named numdata that contains an integer value. Now I want to create an array with the size of numdata. Example: If numdata is 25, then the array should be test(25). Unfortunatly test(numdata) doesn't work.
i am using the file type input and an asp upload component to save the file from client machine to server machine. if user type the file name or path that doesn't exists, the upload component still create a file on the destination but that file is empty. Now, how can i determine the size of the file saved on destination. OR its alternative is that can we restrict the user to type the path and file name. i mean the text field is disable and only browse button is used to select a file.
I have just finished building my first shopping cart in asp and MS Access. Originally the shopping cart was to be built for products with no size and colour, however as usual the goal posts have moved and I now need to incorporate a size and colour option for each product. Could anyone explain to me how I can go about doing this i.e. adding the different sizes and colours in the admin website and then linking them to a specific product when it is displayed on the products page? I know they both need to be in a dynamic drop down box when displayed on the products page within the shopping cart, but I am just wondering how to read the correct values out from the table depending on which product is being displayed. I have a normal products table at the moment with general fields i.e ID, name, description etc.