Background info:
I'm attempting to populate an array with specific column numbers from a
database. I have another array(from a linked table) that has matching
column names from the original database.
CODE:
LinkCount=0
ClmCount=0
for each ofield in rs.fields
response.write "<th>" & ofield.name & "</th>"
if ofield.name = strLinkedColumn (LinkCount) Then
redim preserve eClmCount(LinkC ount)
eClmCount(Linkc ount) = ClmCount
LinkCount=LinkC ount+1
end if
ClmCount=ClmCou nt+1
next
strLinkedColumn is an array that contains the column names
eClmCount will be an array that should be populated with the column number
based on matching column names
My problem is that after the last matching strLinkedColumn = ofield.name and
my for each loops into any other fields, my eClmCount array is still being
populated.
example:
DB columns a,b,c,d,e,f,g
strLinkedColumn (0=c)
strLinkedColumn (1=d)
Running through my for each eClmCount would first get populated with 2, then
3 and I would expect it to stop there, but array continues to build but with
empty values so if I loop through strLinkedColumn in the above example with
a response.write "eClmCount: " & eClmCount & "<br>" this is the output I
get:
eClmCount: 2
eClmCount: 3
eClmCount:
eClmCount:
eClmCount:
I hope I didn't make this to verbose, but I hope I explained what my problem
is too =)
--
Thanks from this ASP Newbie 0 1884 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Friday |
last post by:
Sorry if this is the wrong group. I tried to find the one I thought
would be most relevant.
I'm an old PHP guy, who knows little about asp and NOTHING about
asp.net, but need to learn at least enough to convert a favorite PHP
script to work on an ASP.NET site.
I'm experimenting with simple example scripts that will help me learn
how to implement each "piece" of the puzzle.
|
by: Deano |
last post by:
I needed to have a listbox populated by locations which are stored in
tblLocations.
However I wanted an "All locations" entry to be at the top of the listbox.
This is not in the tblLocations.
The resulting list will be used to provide a query parameter and the user
can choose all locations (the default) or a single, specific location.
In the open event of the form containing the listbox I wrote the following
code to achieve this. Could...
|
by: Sangeetha |
last post by:
I came across this array initialisation which I can't follow
----------------------------------------------
public static string AllOperators
{
get
{
|
by: jack-b |
last post by:
Hi,
I have a list box which displays countries names and a second listbox
which displays their cites (based on the selection made in ListBox 1)
If the user selects USA i want to display cities in the States - if the
user selects multiple countries I want to display the cities in ALL the
selected counties e.g. a user select US and England, the second list
would display ally cities in England and all the cities in the US.
|
by: Stephene |
last post by:
New to the world of web design/php/mysql and need help please.
What I'm trying to do:
I would like a web page with three drop down menus each populated by a query
The first represents locations ie Room1, Room2 etc
The second represents locations within the rooms i.e Rack1, Rack2 etc
| |
by: clrockwell |
last post by:
Hey all,
I could use some help with solving problem. Any suggestions are
welcome and very appreciated.
I have two arrays, $feeds and $feedDays. If they both have the same
count, or $feeds has only one value than there is not a problem.
In this situation
|
by: Peter Duniho |
last post by:
On Thu, 14 Aug 2008 18:56:00 -0700, Phill
<Phill@discussions.microsoft.comwrote:
For future reference, if you are asking for help with an error (compile or
execution), you really should post the complete text of the error and be
specific about when and where it happens.
That said, in your code it's clear what's wrong:
|
by: cathyisfrustrated |
last post by:
Hey,
I've been trying to learn javascript for a few days. I'm a bit stuck!
I'd appreciate any links to get me going in the right direction or any advice I can get.
I've written a multidimensional array like this:
var from_array = new Array();
from_array =
new Array ( "Alice Springs", "1.5", "2.8"); new Array ( "Amberley", "1.5", "2.8") ;
|
by: jac130 |
last post by:
i need to populate an array with grades. there is an 'add students & grades' button. user is prompted by input box to enter a students name, then another input box to enter their grade. the student's name is displayed in a list box. but the grades need to be stored in an array. here is a portion of my code:
Public Class btnAdd
Dim grades() As Double
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |