Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: multiple select in a asp page


Message #1 by "Tan Yoke Yew" <yytan@e...> on Fri, 26 Apr 2002 15:41:33 +0800
hi tan

make sure that the tables are present in the database.  as there seems to be
no other problem with the from statement

regards

Bharat Saboo
Radiance Associates
Senior Web Developer / VB Programmer / ASP Programmer
Riddhi Siddhi Trading Company
Manufacturing & Finance Manager

503/504 Mount, J.P. Road,
Versova, Mumbai - 400061.
India

#+xx xx xxxxxxx
email : bharatsaboo@y...
bharatsaboo@h...
================================================
-------Original Message-------

From: JavaScript HowTo
Date: Friday, April 26, 2002 01:41:39 PM
To: JavaScript HowTo
Cc: bharatsaboo@h...
Subject: [javascript_howto] multiple select in a asp page

Bharat Saboo;

first of all, i want to use select statement for >2 time in a same asp page,
because the information i want to extract from the same database but
different tables.

I would like to know, if I want to select 2 tables from same database, how
does it looks like? I have tried like the statement below, but give me error
like this :

Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in FROM clause.
/opac/yytan/status.asp, line 26

<%
Option Explicit
'===================================================================
' description: Checks and get the user name in patron tbl
' Procedure: DrawPage()
'===================================================================
'-----------------------------------------------------------
' START OF CODE TO PUT AT THE TOP OF A PAGE NEEDING
' PASSWORD PROTECTING
'-----------------------------------------------------------

dim conntemp, sqltemp, rstemp, conntemp1, sqltemp1

set conntemp=server.createobject("adodb.connection")
conntemp.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\\NXT3\library\MDB\Library.mde;Jet OLEDB:Database
Password=0123A20987MKc;"

set sqltemp = conntemp.Execute("select * from patron where ID = '"&
Session("name") &"' ")
'sqltemp="select * from patron where ID='"
'sqltemp=sqltemp & Session("name") & "'"
'set rstemp=conntemp.execute(SQLTemp)
conntemp.Close

set conntemp1=server.createobject("adodb.connection")
conntemp1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\\NXT3\library\MDB\Library.mde;Jet OLEDB:Database
Password=0123A20987MKc;"

set sqltemp1 = conntemp1.Execute("select * from transaction where
Patron_ID = '"& Session("name") &"' ")
conntemp1.close

%>






---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20

  Return to Index