navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Free FrontPage Templates

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Creating array with X as the size

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Creating array with X as the size
Page: [1]
 
dzirkelb1

 

Posts: 1315
Joined: 10/5/2004
From: Cedar Rapids, Iowa
Status: offline

 
Creating array with X as the size - 12/10/2007 15:33:24   
I wish to create an array, but the size of the array will change everytime it is created. So, I need to know how to fix this code:

intHeaderCount = 0

for each strFieldHeader in rs.Fields
	intHeaderCount = intHeaderCount + 1
	response.write(strFieldHeader.Name&"<br>")
next

dim arrayFieldHeaders(intHeaderCount)


Error is:

quote:


Microsoft VBScript compilation error '800a0402'

Expected integer constant

/LouisvilleForecast-update.asp, line 21

dim arrayFieldHeaders(intHeaderCount)


What is the correct syntax for this?
ou812

 

Posts: 1603
Joined: 1/5/2002
From: San Diego
Status: offline

 
RE: Creating array with X as the size - 12/10/2007 15:51:34   
I think this might do it for you:
intHeaderCount = 0
dim arrayFieldHeaders()

for each strFieldHeader in rs.Fields
	intHeaderCount = intHeaderCount + 1
	response.write(strFieldHeader.Name&"<br>")
next

redim arrayFieldHeaders(intHeaderCount)


_____________________________

-brian

EnterpriseDB: Enterprise-class relational database management system
PostgreSQL: The world's most advanced open source database

(in reply to dzirkelb1)
dzirkelb1

 

Posts: 1315
Joined: 10/5/2004
From: Cedar Rapids, Iowa
Status: offline

 
RE: Creating array with X as the size - 12/10/2007 15:59:26   
Oh ya, redim, thats it...thanks!

(in reply to ou812)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Creating array with X as the size
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts