Wrox Programmer Forums
|
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP 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 April 29th, 2004, 09:12 AM
DB DB is offline
Registered User
 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Inner Join problem: Urgent

Hi every body

I have tried to retrieve data from two tables and display on the browser with the edit and delete links. So far i have done well. But when i have tried to click on edit link, in order to edit this record(s) by using BillCode as an ID. But the problem is that it seemsthat sql syntex error exists here.

Look at the code, please


<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim oRSmt 'Holds the recordset for the record to be updated
Dim sqlText 'Holds the SQL query for the database
Dim UserID 'Holds the record number to be updated

'Read in the record number to be updated

UserID=Request.QueryString("BillCode")

'Create an ADO connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")

adoCon.Open "DSN=Appo"

Set oRSmt = Server.CreateObject("ADODB.Recordset")

sqlText= "SELECT Appointment.BillCode, Appointment.Lname" Appointment.Fname, Appointment.Tel,Appointment.Time_reserved, Billing.Paid "
sqlText= sqlText & "FROM Appointment INNER JOIN Billing ON Appointment.BillCode = Billing.BillCode WHERE BillCode=" & UserID &""

'Open the recordset with the SQL query
oRSmt.Open sqlText, adoCon
%>

 
Old April 30th, 2004, 03:43 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Get rid of the " after Appointment.Lname





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Join/Where jpryor SQL Server 2005 2 April 12th, 2008 01:25 AM
inner join problem john-boy SQL Language 1 March 29th, 2006 06:30 AM
Inner Join Problem rylemer SQL Language 2 October 21st, 2005 04:41 PM
Oracle 8i inner join and left join problem puteri_84 Oracle 2 August 19th, 2004 07:14 AM
JOIN problem kaz SQL Language 4 December 22nd, 2003 04:13 PM





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