Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Unable to configure ASP site so that update page displays data for logged on user, only.

Guest
May 20, 2010 May 20, 2010

Hi there. I'm using Dreamweaver 8 to develop a small site (ASP and VBscript) with an Access database  containing customer records. The admin pages I set up work fine and I'm  able to view and delete records.

I have an update page for customers that should only display the record  of the person that is logged in. When a user logs in, there is a link to the customer update page. When they click the link, the 'CustomerID' key  field session variable should be passed by URL to the update page but the update page just displays the  first record in the database.

Thanks in advance for your time.

TOPICS
Server side applications
427
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 20, 2010 May 20, 2010

I'm trying to pass the login session variable URL but I am getting the following message -

ADODB.Field error '800a0bcd'

Either BOF or EOF is True, or the current  record has been deleted. Requested operation requires a current record.

/users/u0840371/custupdate.asp, line 226

Any help is appreciated.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 20, 2010 May 20, 2010

Ok, I found this on another forum and it did the trick.


This is very easy to set up in Dreamweaver.  Asuming you have already  set up your Log In User behaviour, create a new Session Variable from  the Bindings menu.  Where it asks for a name, type MM_Username.

You can now create a recordset on your following page to retrieve a  record that matches the login name.


Create a new recordset, select your connection and table, and set up  this filter:

FILTER: <field which holds usernames> = SESSION VARIABLE  MM_Username

You can now insert the fields from the recordset on you your page.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 20, 2010 May 20, 2010

>When a user logs in, there is a link to the customer update page.

>When  they click the link, the 'CustomerID' key  field session variable

>should  be passed by URL to the update page but the update page just

>displays  the  first record in the database.

That's very dangerous. You should never pass an id in a url that is used for updating data. Someone could easily modify the url and change another record. If you are using a session variable, then there is no reason to pass it in the url. Just get it with your VBScript.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 20, 2010 May 20, 2010
LATEST

bregent wrote:

>When a user logs in, there is a link to the customer update page.

>When  they click the link, the 'CustomerID' key  field session variable

>should  be passed by URL to the update page but the update page just

>displays  the  first record in the database.

That's very dangerous. You should never pass an id in a url that is used for updating data. Someone could easily modify the url and change another record. If you are using a session variable, then there is no reason to pass it in the url. Just get it with your VBScript.

Thanks. I will keep that in mind for the future. I've actually used a session variable now and it's working fine. Thank you for responding to my message.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines