Library Management - school project

woytas

New member
Joined
Dec 6, 2015
Messages
4
Programming Experience
Beginner
Hello

I'm new user on this forum and new in Visual Basic. I'm student and just learning from few weeks, but I have some difficulty with understanding some problems and can't find solution in google.
My study work is to create very simple Interface for database in MS Access. I manage to make login screen, book manager, user manager, user register. I have problem to make panel to issue book and some in login.
My assignment says that library need to have 3 types of books: General Books - can be issue for 14 days, Reference books - can be issue for 7 days and journal can't be issue at all.
I make this tables and query:
forum.jpg
VB form:
libraryManagerFormBookUser.jpg

I would like to after search book by name (this is working now but only by title) I can issue this book for x days depend of book type (7,14,0) with massage saying "book issue till:"
and add data of user and book return date to database, that admin can see in Book Manager panel. I stuck and don't know how to do it

Can anybody help me please? Sorry if I made this post wrong.

this is my code so far:
Imports System.Data.OleDb
Imports System.IO

Public Class BookUser
Dim strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Directory.GetCurrentDirectory & "\Database" & "Sample_DB.mdb"
Dim con As New OleDbConnection
Dim cmd As New OleDbCommand
Dim da As New OleDbDataAdapter
Dim dt As New DataTable

'Sub to fill in the datadrid. It displays all the records from the basic information table
Sub Fill_Grid()
Dim con As New OleDb.OleDbConnection
con.ConnectionString = strConn
con.Open()

'create a new oledb dataadapter
Dim da As OleDbDataAdapter = New OleDbDataAdapter("SELECT * FROM Book_Details", con)
'create a new dataset
Dim ds As New DataSet()
'fill the dataset
da.Fill(ds)

'attach dataset to the datagrid
DataGridView1.DataSource = ds.Tables(0)
ds = Nothing
da = Nothing
con.Close()
con.Dispose()

End Sub

Sub Search()



End Sub

Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click


Dim con As New OleDb.OleDbConnection
con.ConnectionString = strConn
con.Open()

'create a new oledb dataadapter
Dim da As OleDbDataAdapter = New OleDbDataAdapter("SELECT * FROM Book_Details where BookTitle like '%" + TextBox7.Text + "%'", con)
'create a new dataset
Dim ds As New DataSet()
'fill the dataset
If (da.Fill(ds, "Book_Details ")) Then
DataGridView1.DataSource = ds.Tables(0)
' Fill_Grid()

MessageBox.Show("Record found")
Else
MessageBox.Show("Record not found")
End If




End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

End Sub
End Class

I have no idea even where to start :(
If someone want to help and looking for some money I don't mind to pay reasonable fee.

Please help
 

cjard

Well-known member
Joined
Apr 25, 2006
Messages
7,052
Programming Experience
10+
Let's try and make your life a bit easier.. Click the DW4 link in my signature, and then read "Creating a Simple Data Application"

Follow the example exactly first time, then throw your app away, then follow the example again but using your database instead. Then come back here
 

woytas

New member
Joined
Dec 6, 2015
Messages
4
Programming Experience
Beginner
Thank you for your time, but somehow I sit on this and made it by myself. I already finish and upload my project. Maybe it's not perfect but it works and do all required functions :). I can paste a code if you want.
 
Top Bottom