Progressive Number/array

Below is the script i use to copy and duplicate. Here it copies a form which has a table and a textbox in it.. Code:

View Replies


ADVERTISEMENT

Adding Index Number To A Dynamic Array

I've probably done this before, but for the life of me I can't remember how
I did it. I need to move values from a DB table into an array to be used
for other queries. The number of records will vary, so I need to make the
array dynamic. Can someone remind me how I can increment the index when I
write a new record? Code:

View Replies View Related

Varying Number Of Database Columns Into Array

I have a DB that contains several columns named Line1, Line2, Line3, and Line4. After that I there are 50 columns named Data0 through Data49. Data0 and Data1 will always contain text but Data2 through Data49 may or may not be empty.

I am trying to take the values out of the database and put them into arrays. Since Line1 through Line4 never change I have no problem getting them into one array but I am lost on the logic/syntax on how to not only determine how many Data(n) cells are populated but then how to get them into a new array.

View Replies View Related

Convert Real Number Into Text Number

I need to insert some number into database as text. My problem is if I insert the number (ie. 4.0), the value in the database only show (4). So, is it possible to convert a real number into text number using ASP?

View Replies View Related

Sequential Number After Batch Number

here is the scenerio

in master batch table i have various master batch like
200701-0001
200701-0002
200701-0003

Now each master batch can have multiple final mixed batch like

200701-0001-01
200701-0001-02
200701-0001-03

and this record is inserted in to fmix table.

so i have a form in which i have a dropdown menu in which all the master batch is listed,
i select 200701-0001 and that value is passed to next page where i will enter other fields data and insertion to my fmix_no will be done automatic like 200701-0001-01, 200701-0001-02 and so on,

how to achieve this

so in short each master batch will have more than one final mixed batch.

pls help, also if u have any online contact in yahoo or msn pls send me, i am so confused and badly struck deadline is just couple of hours away. my yahoo id is(E-Mail address blocked: See forum rules) you can PM me i am online right now.

View Replies View Related

Retrieve The Error Number In VB With Err.Number

I want To handel the error messages by myself in one part in my script. I know that in VB I can Use the statment - On error resume next And I also know that I can retrive the Error Number In VB with Err.Number.

How can I handel the errors by myself in ASP? I heard about the ASPErr Object, Is it the same thing like the err object in VB?

View Replies View Related

Rebuilding Of An Array From An Existing Array

I dump the entire recordset into an array:

If not rs.EOF Then
aEmp = rs.GetRows()

Contents of the array are in this order:

EmpID,EmpName,Indent,Sub_ID,Lft,Rgt,MgrID, LastName

This query sort on the basis of Lft and Rgt columns.

The name of the array is: aEmp.

My question here is how can I get only the LastName from the aEmp array into another array so that I can sort the names alphabetically and then display the employees in the alphabetical order.

Or is there is another way I could this by using the same array while keeping the lft and rgt sort of the query? If I sort based at the SQL query level, I can see the names sorted by the lft, rgt and lastname, but since the lastname is at the end of the sort list - it does not appear alphabetically.

View Replies View Related

Array Integers Vs Array Variables

In working with arrays, I have found that I am unable to dimension and array
with a variable that has an integer value but I can redimension one this
way. I haven't see any information that tells me if this is a requirement,
although it appears to be because I get an error if I try it.

Ex.

Dim b
b = 10
Dim a(b) ' this errors out but
Dim a() ' this
Redim a(b) ' works

Code:

View Replies View Related

Create A New Array From An Array

I want to create a new array called arrNames2 and copy contents of arrNames to arrNames2.

I then want to loop through my db and add more names (while going through the loop) to arrNames2. What is the best way to do this? Do I have to keep redim the array wehn I add more names?

View Replies View Related

Number

if I dispaly certain column data from database, how to make the auto numbering in front of each data?for example

1. ha
2. ho
3. hu

let say the ha, ho and hu is data that call from database column.

View Replies View Related

Whole Number

Can you help me with this? Is there any function that I can use in getting a
whole number

Example:

Input OutPut
12.3 12
1.63 1
21.1 21

Im using the function left(p1,p2) but it doesnt recognize the whole number

View Replies View Related

Err.number <>0

I have an error statement in place which i would like to catch when a problem aoccures and assign a value to Compensation.
Code:

If Err.number<>0 then

If iCount Mod 2 = 1 Then
objRS.Move ((iCount + 1)*0.9)-1
Compensation = Int(objRS(0))
Else
objRS.Move (iCount*0.9)-1
Compensation = objRS(0)
objRS.MoveNext
Compensation = (Compensation + objRS(0))/2
End If
Else
Compensation = 0
End If

at the moment,Compensation seems to always have the value of 0 even when an error is not evident. Have i got this the wrong way around?

View Replies View Related

Number

i m getting such number 3001/e-00084308/00/000
so each time i want to change 00 to 01 in above number

View Replies View Related

Number IP

I want to have the address IP of the client's machine. I have made this.

<b>Your IP address is:</b>
<%Response.Write(Request.ServerVariables("remote_addr"))%>
</p>

but It give me the address of my host I wish I have IP of the machine client.

View Replies View Related

Avg Number

I am using the code below to count the number of records and divide it by the sum of the records to get the average number. I get the error : Type mismatch: 'ubound' . I know I'm missing something obvious as my experience with arrays have rendered below.

<% PriceArray = Recordset1("TotalBidPrice") %>

<%
for x = 0 to ubound(PriceArray,2)
CountArray = CountArray + PriceArray(0,x)
next

ThePriceAvg = CountArray/(ubound(PriceArray,2) + 1)
%>

<%=ThePriceAvg%>

View Replies View Related

Not A Number

How do you check if a value is "not a number" in Visual Basic? Ie:

If textbox is not a number then
msgbox "Please enter a valid number"
Else
.............
End If

View Replies View Related

ID Number

I have a form on my site, in the form there is a field called ticketid, I want this field to be prepopulated everytime the user opens the form, Also would like to have it start with 1000 so if the it gets open second time its 1001, third time 1002 and so on. Code:

View Replies View Related

Null Number

Microsoft OLE DB Provider for SQL Server (0x80040E2F)
Cannot insert the value NULL into column 'ContactID', table 'ka0506a.ka0506a.contacts'; column does not allow nulls. INSERT fails.
/submitcontact.asp, line 15

What happened is i used to used MS Access and ContactID is an Autonmuber field, and now my connection is set to MS SQL so it's giving me this error, what's causing this error to happen and how can i change it ?

View Replies View Related

Number In A Repeater

I have a repeater that pulls back informtion from a MySQL database. I was wondering how could I put a counter that increments as each row is returned and displays it in the repeater. For example where it says Day:, I want to make that Day: 1, Day: 2 etc as each row is returned.

The Day: 1++ is just a demonstration of what i want incremented.

<asp:Repeater ID="RepeaterUserReportSummary" runat="server">
<ItemTemplate>
<table style="width: 990px">
<tr>
<td style="width: 185px;height: 10px;"><b>Day: 1++ </b></td>
<td style="width: 35px;height: 10px;"><b>Total:</b><%# Eval("TotalReport")%>cal</td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>

View Replies View Related

Number Of Records

Any build in function that can calculate number of records in a table?

View Replies View Related

How To Round Up A Whole Number?

I've created a freight calculator that needs to know how many pallets I'm shipping. I'm using 1 pallet for 750lbs and an extra pallet for anything more than that.

If materialWeight <= 750 Then numPallets = 1 Else numPallets = Round(materialWeight / 750) End If

Now, let's say the materialWeight/750 ends up being 3.2. This is returning 3, but I need it to return 4 since we need an extra pallet.

How can I make it Round up to the next whole number? If it turned out to be an exact number without a decimal then it should stay where it is, but if it's over x.0 at all it should go up to the next whole number.

View Replies View Related

Number Truncation

Is there a command in asp to truncate a decimal? Currently I've got a number that's coming out with up to about 12 decimal places based on input fom the user and I'd like to force it to just display up to two decimal places. Is that possible?

View Replies View Related

How Can I Know My IIS Version Number?

I am using w2000+sp4 server with IIS running, how can I know my IIS version
number, is it iis5.0 or 5.1 or 6.0?

I must know this, since I want to download patches from MS web site,

View Replies View Related

Number Of Bytes

When we are using ENCTYPE="multipart/form-data" for file uploading, we can use Request.TotalBytes to get the total number of bytes sent by the user in http. Is it possible to get the bytes of a specific field from that form

View Replies View Related

Get Week Number

Does anybody know how I can get the week number. The week number we are currently on is 28 and I need to be able to reitrieve this number so that i can manipulate for loops to advance that number to 33 and 38.

View Replies View Related

Number Of Options

I have an ASP variable which is a certain number. I want to create a Select tag in a form, which will be populated up to this number. So, for example, if my number was 7, you would have a list of numbers between 0 and 7 to select.I'm not sure how to do loops, but I had an idea that the code would look something like this:
Code:

<select name="select2" id="select">

<%
for i=0 to i=varNumber
Response.Write ("<option value='"& i &"'>"& i &"</option>")
rsBooking.MoveNext
%>

</select>

but, as you might guess, this doesn't play!

View Replies View Related

Number Exponentiation

I want to trim a number and display the integer and decimals
separately, as such I'm trying to convert it to a string so I can
truncate it.
No matter what combination of int or CStr I try, VBScript displays
long numbers such as:

345332523545325425235255453.6789555

in its exponentiated form:

3.45332523545325E+26

How can I stop this?Alternatively is there a function that will separate the two for me?

View Replies View Related

Sum Of Number Records

I have a results page which retrieves a number. I am using "Repeat record" to get a list of all the number records of the database.

I would like to make a sum of all these records at the end of the result page.

record1 = 100 (repeat region)
record2 = 500
record3 = 100

and then, how can I make a sum of these records?

Total = 700

View Replies View Related

Ticket Number

I have all the ticket numbers displaying as a link ready to be edit! My question is how can I display that ticket number with all the information that comes with it when the user click it to be edit.
Would I have to use the Request.Form("Ticket_Number") or something else?
Here's the code.

Response.Write("<td><a href='Results.asp?=" & objRS("Ticket_Number") & "'>" & objRS("Ticket_Number")& "</a></td>")


Response.Write "<td>" & objRS("Escalation_Type") &"</td>"
Response.Write "<td>" & objRS("First_Name") &"</td>"
Response.Write "<td>" & objRS("Last_Name") & "</td>"
Response.Write "<td>" & objRS("Account_Number") & "</td>"
Response.Write "<td>" & objRS("Phone_Number") & "</td>"
Response.Write "<td>" & objRS("Cae_Name") & "</td>"
Response.Write "<td>" & objRS("Cust_Com") & "</tr></td>"

View Replies View Related

Currency Number

I have a ASP shopping cart system and sell expensive products that can push the total purchase price over $1000. If the invoice total is more than $999.99... say $1010.00, it passes a value of $1.00 instead of $1010.00. Anything under $999.00 get processed just fine. Of course, Authorize.net say's it's my code and not their system.
Is there a limit to FormatCurrency that would cause it to trim the value? I'm not quite sure where to begin looking but my "hidden x_amount" value thats passed along to the gateway is using FormatCurrency.

Code:
<input type="HIDDEN" name="x_amount" value='<% = FormatCurrency(Request("GrandTotal"))%>'>
Looking at it just know I noticed that the x_amount value is enclosed in ' ' instead of " "... could the comma in the currency value $1,010.00 be ending the code? It happened to some of my product drescriptions that had a comma. Changed it to " " and all was well.

View Replies View Related

Item Number

I want to reverse a folder listing, can I referre to a collection with a
item number like in arrays?

ex:
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder(smp)
for each subfld in fo.subfolders
..
..
next

can I do the FOR statement reverse without putting all folder names into an
array.

View Replies View Related

Format Number

I am trying to create a form and I have looked on the forums and couldn't find anything like this.

Situation.
I want to convert example S.S. number from this

123-45-6789
to this
XXX-XX-6789

How can I do this in ASP?I tried a replace function but doens't work or I have it completely wrong format

View Replies View Related

Random Number

trying to get a random number from 0000 to 9999, is there an easy way to do this? i'm using this for a unique filename and want it to be 4 digits from 0000 to 9999.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved