Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 11th, 2004, 08:45 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default how to make column of table 1 = to column of table



I want MS Access 2000 database column of table 1 = column of table 2.

This is what I was doing:
Code:
<%
'Option Explicit
'Response.End 
Response.Buffer=false

Dim letter

'SQL = "SELECT bible.book_spoke, biblewheel_url.letter FROM bible, biblewheel_url WHERE bible.book_spoke=biblewheel_url.book_spoke" 

    SQL = "SELECT * FROM biblewheel_url WHERE "
    strConn = GetConnectionString()

SQL = SQL & "letter(biblewheel_url.book_spoke) = rs(bible.book_spoke)"

    Set letter = Server.CreateObject("ADODB.Recordset")
    letter.CursorLocation = adUseClient

    letter.Open SQL, strConn, adOpenForwardOnly, adLockReadOnly
%>
<%=letter("url")%>
<%
    letter.Close
    set letter = Nothing
%>
and to pull url address of table 2 to which record it is =to



 
Old October 11th, 2004, 11:37 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
quote:SQL = SQL & "letter(biblewheel_url.book_spoke) = rs(bible.book_spoke)"
Can you post on what comes in rs(bible.book_spoke)? Though you can modify that as
Code:
SQL = SQL & "letter(biblewheel_url.book_spoke) = " & rs(bible.book_spoke)
Not sure what datatype it is, so use single quotes around if required.

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old October 11th, 2004, 11:49 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yes. This is what I get:
Code:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 

[Microsoft][ODBC Microsoft Access Driver] Undefined function 'letter' in expression. /wheelofgod/letters.asp, line 18
letters is an "include" asp file. The purpose of this is to match the column of table 1 with the column of table 2 because table 2 has url links for each record. Thus by clicking on the link I should get different url depending what the number is.

Example I have "book_spoke" from table 1 which has a value of '15'. It should match with the "book_spoke" from table 2 which has the same value. (which one has to be primary key?). So table 2 has a url for each "book_spoke" value.

RS is supposed to be the recordset for the first sql. Letter is supposed to be the recordset for the second. I don't know if it makes sense. The second sql is for the second table.

 
Old October 11th, 2004, 11:53 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default

ok. I tried your line and it says:
Code:
Microsoft VBScript runtime error '800a01a8' 

Object required: '' 

/wheelofgod/letters.asp, line 14
 
Old October 11th, 2004, 11:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

what is on line 14? did you declare RS?

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
hide certain column in a table lscjtw XSLT 2 August 2nd, 2007 01:26 PM
how to swap the table column value shahidmca SQL Language 2 July 31st, 2007 06:43 PM
I added a column to a table, but, I can't see it. furjaw SQL Language 1 July 3rd, 2007 09:24 PM
getting identity column from the table g_vamsi_krish SQL Server 2000 1 March 15th, 2006 05:05 PM
Column position in table kasanar SQL Server 2000 7 June 2nd, 2005 02:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.