Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check before adding a recored

Status
Not open for further replies.

RicCross

Programmer
Dec 4, 2001
19
GB
Hello out there every one, hopy you all have a good christmas


I got a question I have a access 2000 database with a asp page connecting to it. The database is a booking system with a table called tbl_bookings and the fields booking_date, start_time, finish_time. I have a html page with a form that links to the to an asp page with the following code

<%@ Language=VBScript %>
<!--#INCLUDE FILE =&quot;adovbs.inc&quot;-->
<%
set conn=server.CreateObject(&quot;ADODB.Connection&quot;)
Set rs=server.CreateObject(&quot;ADODB.Recordset&quot;)
strConncetionSting=&quot;DSN=video;DBQ=C:\DATABASE\video.mdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;PWD=2magic2;UID=admin;&quot;

conn.Open strConncetionSting

rs.locktype =adlockOptimistic
rs.open &quot;tbl_booking&quot;,conn

rs.addnew
rs(&quot;booking_date&quot;) = request.Form(&quot;txt_date&quot;)
rs(&quot;start_time&quot;) =request.Form(&quot;txt_start&quot;)
rs(&quot;finish_time&quot;) =request.Form(&quot;txt_finish&quot;)
rs.update

rs.close
set rs=nothing
conn.Close

This alworks great but when i add a new booking I want to check that after all the data has been enter that there is not already a booking in between the times and data of the new booking.

any help of who to do this or where to start would be great
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top