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 June 20th, 2003, 05:35 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default Comparison in Access

Hi all.

I've got an editor on my site and when a user edits his content I check the content in the db to see if he actually made any changes. If he did then I update the fields and if not I stop the execution and tell the user that nothing changes.
The way I do this is by calling a stored procedure and the populate a recordset with the content I then compare it via VBScript. My question is : Is it not possible to do that compare in SQL and the return a boolean flag? I can't figure out the SQL to do that and I don't know how to return calculated value (ie. true or false) from a stored proc... Only a field value.

Any help would be nice. I might just need a point in the right direction.

Regards - Jon
__________________
- mega
Aspiring JavaScript Ninja
 
Old June 23rd, 2003, 12:52 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You could try:

SELECT False AS isEdited FROM myTable WHERE myField1 = 'userValue1' AND myField2 = 'userValue2' AND myField3 = 'userValue3'

If the recordset is .EOF, then no records matched, so the user has made changes. If the recordset is not .EOF then the user hasn't made changes. As far as I know, Access does not support output parameters, so you can't just return a true/false value.

Cheers
Ken

www.adOpenStatic.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
datetime comparison MunishBhatia ASP.NET 2.0 Professional 2 May 24th, 2007 07:42 AM
String comparison arnabghosh Classic ASP Professional 1 June 29th, 2006 06:01 AM
Access Form problem, date comparison jackson_jl VB Databases Basics 0 March 9th, 2005 02:13 PM
Date Comparison hoffmann Classic ASP Databases 7 October 21st, 2004 09:00 AM
String Comparison rylemer Pro VB 6 9 July 29th, 2003 06:49 AM





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