View Single Post
  #1 (permalink)  
Old February 1st, 2010, 08:18 PM
leonardpogrady leonardpogrady is offline
Authorized User
 
Join Date: Jan 2010
Location: Whitsundays Australia
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
Default MS Access SQL Problem

Hi,

I am developing a site with ASPVisualBasic, Dreamweaver MX and MS Access Database. I have a login page that opens from a relational database users.mdb with 2 tables Client/Company. I enter user and password and that takes me to another page my products and services page. This has links to a number of my services. The one I am having a problem with is upload debtors.

Having already login in when I click upload debtors a new form opens and the details of the client who loged in should populate the form from the 2 tables Client/Company.

I have 2 Recordsets (Recordset1) for the Company table and (rsclient) for the Client table.

The populating data from the (rsclient) inserts into the form ok changing to suite the different client login's and displaying their matching data correctly.

(The Problem) is the populating data from the (Recordset1) that should display things like Company Name, Trading name and so on, will not change the details based on the user who logs in. No matter what login/(matches the ID row) I use it will only display the first row in the table Company, when I deleted the first row of data it displayed the 2nd row of data not matching the row connecting the login details.

(Recordset1) SQL looks like this-

SELECT *
FROM Company
WHERE CompanyID like 'qrycompanyid'

Variables look like this -
NAME DEFAULT VALUE RUN-TIME VALUE
qrycompanyid % Request.QueryString("ClientCompanyID")

(rsclient) SQL looks like this- and remember this works

SELECT *
FROM clients
WHERE UsrName like 'MM_Username'

Variables look like this-
NAME DEFAULT VALUE RUN-TIME VALUE
MM_Username % Session("MM_Username")

Can anybody out there get me out of trouble with above?

Cheers

Leonard P.O'Grady
Whitsundays
Australia
Reply With Quote