Question Need some help in my application

Classical Lady

New member
Joined
May 2, 2011
Messages
3
Programming Experience
1-3
Hi there.. :eek:
I am new at this forum,, I don't know if this is the right place to post my question,,, Sorry if it is the wrong one... I'm looking for some help in my application..

I'm using VB 2008 Express to create a small Reservation System for halls. I'm using Access 2007 for the DB.
What I want to do is that I want to validate the new record to prevent the user from booking the same hall at the same date and time. So, I have for things to check: 1. Hall Name , 2. Booking Date , 3. Time_From , 4. Time_To ... I want the user to get a message box telling him that the hall is already booked at this time.

Please, help.... Thank you so much in advance :)
 
I don't know if this is the right place to post my question
i think you should have posted it in the Access as a Backend MS Access , ..im sure one of the mod.'s will move this thread if deemed necessary

I'm using VB 2008 Express to create a small Reservation System for halls. I'm using Access 2007 for the DB.
What I want to do is that I want to validate the new record to prevent the user from booking the same hall at the same date and time. So, I have for things to check: 1. Hall Name , 2. Booking Date , 3. Time_From , 4. Time_To ... I want the user to get a message box telling him that the hall is already booked at this time.

If you are using it as a backend and your using a windows form, basically what you want to do is connect with the database file first, then read the records from the table, then you are going to want to check those records for the same date/name/etc. with the one being inputted.

Two ways to connect to a access database that i can suggest is using a System.Data.OleDb.OleDbConnection or Microsoft.Office.Interop.Access.Application. You may have to download a oledb driver if you don't already have it, and if you want to use the Interop be sure you import that into your references.

if you are going to use a oledb connection you can write a SQL statement using the OleDb.OleDbCommand("SELECT * FROM someTable",conObj) and then read using a oledbdatareader. If you have a query in your access database you can just call that using the oledbcommand, just be sure to change its commandtype to CommandType.StoredProcedure.

I am not sure what your level of programming experience is, but try reading up on it first if you haven't already, there are alot of tutorials and articles on the web.

Here's a site i like, it has alot of sample code, but it doesn't explain much on how it works or how to use it exactly, so only if you know what your looking for i guess.. Database ADO.net*«*VB.Net





Otherwise expand your question on what exactly your having trouble with and im sure someone here can help you with it if needed.
 
Really need some help with this validation.... it doesn't work!!! :(

Okay, Can you please explain what you have so far? The more relevant info you can provide the better...

What exactly is it that is not working? Are you having any trouble connecting to the access database? Or...?
 
Last edited:
Back
Top