Hello, I'm having a problem with an array in my website.
I have a database with two table ( produkten, indicatie)
in table produkten is a field named indicatie. this field contains an array. all these array need to be connected to indicatiID in table indicatie.
normaly I use -
<%
-
Dim Rsprodukt
-
Dim Rsprodukt_cmd
-
Dim Rsprodukt_numRows
-
-
Set Rsprodukt_cmd = Server.CreateObject ("ADODB.Command")
-
Rsprodukt_cmd.ActiveConnection = MM_Conavo_STRING
-
Rsprodukt_cmd.CommandText = "SELECT * FROM produkten, indicatie where indicatieID like indicatie"
-
Rsprodukt_cmd.Prepared = true
-
-
Set Rsprodukt = Rsprodukt_cmd.Execute
-
Rsprodukt_numRows = 0
-
%>
-
but because produkten.indicatie is an array, this would not work..
can anyone help me to fix this problem?
4 1567
I'm having trouble visualizing what are in each of these columns. Could you please give an example of the contents of these fields? Specifically, what is in the field "produkten.indicatie"?
This is the content of the fields produkten
indicatie
38,3,33
3,33
37,41,11,26
2
14
20
3,13,37,39 indicatie
indicatieID indicatienaam
1 gewrichten
2 pezen
3 bloedsomloop
4 darmstelsel
5 luchtwegen
6 ontwormen
7 insectenbestrijding
8 haargroei
9 hoeven
10 ligamenten
11 vermoeidheid
12 recupertatie
13 conditie
14 krampen
15 rodebloedlichamen
16 weerstand
17 Banden
18 lever
19 nieren
20 stress
21 onrust
22 vochtbalans
23 neusbloeding
24 bloedzuivering
25 huid
26 zomereczeem
27 mok
28 litteken
29 schuren
30 zwellingen
31 peesschede
32 darmen
33 brandwonden
34 schimmels
35 schaafwonden
36 vacht
37 dracht
38 Artrose
39 eetlust
41 Spieren
hmm. So is the produkten.indicatie column a text field of some kind (varchar etc)? In order to do what you are trying to do you will need to cast your integer to text and then use the "like" keyword to search the array field to see if it contains that text. The general form of a query containing "like" looks like this: "WHERE indicatie LIKE '%32%'", but even if you can get that to work (I've never tried it with a casting expression in the value you are searching), that's not a very good solution.
You may not like this, but I think the best solution would be to organize your db differently. it appears that you have a many to many relationship between indicatie and produkten (each produkten can correspond to multiple indicatie and the reverse is also true) in which case I would suggest adding a third table that relates the two - maybe titled produktenIndicatieMembers with fields "produkten" and "indicatie" and a row for every relationship. Does this make sense?
Jared
Yes, it makes sense.
The problem is that I have an update page for produkten. And with an array I could update the produkten.indicatie at the same time with an multiple selection list. In case of a thirt table it is a lot more complexed. Maybe it is possible but I don't see how at this time.
But thank you for your time.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Federico G. Babelis |
last post by:
Hi All:
I have this line of code, but the syntax check in VB.NET 2003 and also in
VB.NET 2005 Beta 2 shows as unknown:
Dim local4 As Byte
Fixed(local4 = AddressOf dest(offset))
...
|
by: justanotherguy63 |
last post by:
Hi,
I am designing an application where to preserve the hierachy and for
code substitability, I need to pass an array of derived class object in
place of an array of base class object. Since I...
|
by: ritchie |
last post by:
Hi,
I am writing to ask if anyone can see why my array is not being sorted
correctly?
It's an array of 4 elements(ints 1,2,3,4) but after calling the
selection sort
it comes back sorted as...
|
by: Gerald |
last post by:
I have a problem with an array of pointers.
In a program I'm writing, I have to read a file, containing thousands
of short lines. The content of another file will be compared against
each line...
|
by: arkobose |
last post by:
my earlier post titled:
"How to input strings of any lengths into arrays of type: char
*array ?"
seems to have created a confusion. therefore i paraphrase my problem
below.
consider the...
|
by: Alexei A. Frounze |
last post by:
Hi all,
I have a question regarding the gcc behavior (gcc version 3.3.4).
On the following test program it emits a warning:
#include <stdio.h>
int aInt2 = {0,1,2,4,9,16};
int aInt3 =...
|
by: intrepid_dw |
last post by:
Hello, all.
I've created a C# dll that contains, among other things, two functions
dealing with byte arrays. The first is a function that returns a byte
array, and the other is intended to...
|
by: Leszek |
last post by:
Hi.
Is it possible in javascript to operate on an array without knowing how mamy
elements it has?
What i want to do is sending an array to a script, and this script should
add all values from...
|
by: sandy |
last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory',
within my class Directory (Can you already smell disaster?)
Each Directory can have subdirectories so I thought to put these...
|
by: assgar |
last post by:
Hi
Seasons Greetings
Its back, I am being haunted.
I thought I had resolved this problem but I am intermittently
the receving the warnings below.
This code consist of a 1) HTML form, 2)...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
|
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,...
| |