Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 20th, 2003, 05:35 AM
Friend of Wrox
Join Date: Jun 2003
Location: Copenhagen N, , Denmark.
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
Reply With Quote
  #2 (permalink)  
Old June 23rd, 2003, 12:52 AM
Friend of Wrox
Join Date: Jun 2003
Location: Sydney, NSW, Australia.
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts

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.


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 10:57 PM.

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