🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.databases
Article #82

help with database programing

#82
From: Tomas Forsman
Date: Thu, 03 Feb 2000 00:00
73 lines
3366 bytes
I use access database and vbscript
What I am trying to do is taking all the number from column ID and make them
variables wich I fill with the value of all the contents of column genre.
In another table I have numbers representing genres and I want to use the
variables I have created and show the content of them on the page.
Here is my code.
I want the variables to be named number1 number2 and so on
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF">
<%
Set Anaconda2 = Server.CreateObject("ADODB.Connection")
Set rs2 = Server.CreateObject("ADODB.Recordset")
Anaconda2.Open "DSN=it-designer2;UID=;PWD="
SQL2 = "SELECT * From genre"
rs2.Open SQL2, Anaconda2
Do While Not rs2.EOF
number&rs2("ID") = rs2("genre")        <<<<<<<<<<<<<<<<Here is where I got
the main problem.
rs2.MoveNext
Loop
Anaconda2.Close

Set Anaconda = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
Anaconda.Open "DSN=it-designer2;UID=;PWD="
SQL = "SELECT * From object WHERE objects LIKE '%" & Request.Form("find") &
"%'"
rs.Open SQL, Anaconda
%>

<table width="650" border="0" cellpadding="0">
  <tr>
    <td>Object</td>
    <td>Data</td>
    <td>Siffra</td>
  </tr>
<%
Do While Not rs.EOF
%>
  <tr>
    <td><%=rs("objects")%></td>
    <td><%=rs("data")%></td>
    <td><%=numbr&rs("siffra")%></td>
<<<<<<<<<<<and here I want to show the variables. corresponding to the
number in column "siffra">>>>>>>>>>
  </tr>
<%
rs.MoveNext
Loop
%>
</table>
</body>
</html>

I would be very greatful for all help I can get.

With regards
Tomas Forsman



--
***---***---***---***---***---***---***---***---***
http://www.it-designer.com
http://hemma.kramnet.com/tomas.forsman/flashsite
http://hemma.kramnet.com/tomas.forsman
http://www.freebox.com/vrm
***---***---***---***---***---***---***---***---***
Technical Details
Message-ID: <3899ad7d.0@d2o50.telia.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1589e7,49afe5b8511db3f3,start
X-Google-Attributes: gid1589e7,public
X-Google-Thread: ff0ac,49afe5b8511db3f3,start
X-Google-Attributes: gidff0ac,public
X-Google-Thread: 11355a,49afe5b8511db3f3,start
X-Google-Attributes: gid11355a,public
X-Google-Thread: f8db2,49afe5b8511db3f3,start
X-Google-Attributes: gidf8db2,public
X-Google-Thread: 105516,49afe5b8511db3f3,start
X-Google-Attributes: gid105516,public
X-Google-Thread: 10a90d,49afe5b8511db3f3,start
X-Google-Attributes: gid10a90d,public
X-Google-Thread: fdf39,49afe5b8511db3f3,start
X-Google-Attributes: gidfdf39,public
X-Google-Thread: 104de1,49afe5b8511db3f3,start
X-Google-Attributes: gid104de1,public
From: "Tomas Forsman" <tomas.forsman@kramnet.com>
Subject: help with database programing
Date: 2000/02/03
Message-ID: <3899ad7d.0@d2o50.telia.com>
X-Deja-AN: 581346574
X-NNTP-Posting-Host: 195.198.219.40
Organization: Telia Internet Services
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Newsgroups: alt.comp.databases,bit.listserv.sqlinfo,borland.public.database.sqlservers,comp.database,comp.databases.ms-access,comp.databases.ms-sqlserver,it.comp.database.access,microsoft.public.ado,microsoft.public.sqlserver.misc,microsoft.public.sqlserver.
X-Complaints-To: abuse@internet.telia.com