Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 11th, 2004, 08:45 PM
Friend of Wrox
Points: 1,107, Level: 13
Points: 1,107, Level: 13 Points: 1,107, Level: 13 Points: 1,107, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2004
Location: , , .
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



Reply With Quote
  #2 (permalink)  
Old October 11th, 2004, 11:37 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
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
Reply With Quote
  #3 (permalink)  
Old October 11th, 2004, 11:49 PM
Friend of Wrox
Points: 1,107, Level: 13
Points: 1,107, Level: 13 Points: 1,107, Level: 13 Points: 1,107, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2004
Location: , , .
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.

Reply With Quote
  #4 (permalink)  
Old October 11th, 2004, 11:53 PM
Friend of Wrox
Points: 1,107, Level: 13
Points: 1,107, Level: 13 Points: 1,107, Level: 13 Points: 1,107, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2004
Location: , , .
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
Reply With Quote
  #5 (permalink)  
Old October 11th, 2004, 11:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:47 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.