MS Access SQL query failing?
Hi,
I am a novice Dream Weaver MX user, developing on a XP Professional box. I am using MS Access DB from Office Professional 2007.
I am using files from a previous web site I had built some years ago. I have re-worked the site and it is finished and now running on the host server. Unfortunately I am using a disfeatured form to upload my client’s overdue debtors for processing. The fully functioning form used record sets to display my client details on log in using an ID for each client.
The record sets are from 2 tables 1 Clients 2 Company in my relational user’s database.
THE PROBLEM IS THAT WHEN I LOG IN USING A VALID PASSWORD/ID (MINE) IS ON ROW 32, BOTH MY ROW ID FOR CLIENTS AND COMPANY ARE ON ROW/ID 32. BUT WHEN I LOG IN THE RECORD SETS WILL ONLY DISPLAY THE FIRST ROW/ID NO MATTER WHAT ROW THE PASSWORD WAS LINKED FROM.
The record sets in my application panel under the Server Behaviours tab are-
Recordset {record set1} from the Company table. This is set as default to row 1
Recordset {rsclient} from the client table. Indecently this client table recordset works in the form correctly!
The query from Recordset {record set1} looks like this-
Name: Recordset1
Connection: collectoz (is working)
SQL: SELECT *
FROM Company
WHERE CompanyID like 'qrycompanyid'
Variables:
Name Default values Run-Time Value
Qrycompanyid % Request.QueryString("CompanyID")
The query from Recordset {rsclient} looke like this-
Name: rsclient
Connection: collectoz
SQL: SELECT *
FROM clients
WHERE UsrName like 'MM_Username'
Variables:
Name Default Value Run-time Value
MM_Username % Session("MM_Username")
The Dynamic Text fields for Recordset {record set1} from the Company table are-
<%= (Recordset1.Fields.Item("CompName").Value) %> (stuck on row one)
<%= Recordset1.Fields.Item("CompABN_ACN").Value %> (stuck on row one)
<%= Recordset1.Fields.Item("CompTradAs").Value %> (stuck on row one)
<%=(Recordset1.Fields.Item("CompTrdAdL1").Value)%> (stuck on row one)
<%=(Recordset1.Fields.Item("CompTrdAdL2").Value)%> (stuck on row one)
<%=(Recordset1.Fields.Item("CompTrdAdL3").Value)%> (stuck on row one)
The Dynamic Text fields for Recordset {rsclient} from the client table are-
<%= rsclient.Fields.Item("UsrName").Value %> (this one and below are working properly)
<%= rsclient.Fields.Item("Email").Value %>
<%= rsclient.Fields.Item("Phone").Value %>
<%= rsclient.Fields.Item("Fax").Value %>
If you need more information let me know
Cheers
