Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old August 28th, 2003, 05:48 AM
monfu monfu is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 32 monfu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 25 sec
Reputation Power: 6
lock Access Database

Dear All,

what I need to do is the following:-

1) Open a table to insert a new record
2) Lock this table so there is no new entries in it
3) get the maximum call number and add 1 to it
4) insert the new record
5) Unlock the table again.

How can i do it? I know how to insert the record and get the maximum call number. What i do not know is how to lock and unlock the table.

Thanks for your help and time

Reply With Quote
  #2  
Old August 29th, 2003, 03:35 PM
dcarva's Avatar
dcarva dcarva is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 633 dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 9 h 18 m 20 sec
Reputation Power: 6
Are you wanting to do this via code?

I know you can do this with ADO. You can specify a lock type. See this article:

http://www.aspalliance.com/aspxtrem...s.aspx?pageno=3

Reply With Quote
  #3  
Old September 13th, 2003, 11:06 AM
unatratnag unatratnag is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 312 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 6 sec
Reputation Power: 6
Send a message via AIM to unatratnag
So you're just adding 1 to the primary key? Why not just use the autonumber field provided by access? You just insert the record and then it handles the rest for you and you dn't have to deal with locking the database, it's also much more secure/easier to code.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > lock Access Database


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway