请在VB.NET中帮助我 [英] Please help me in VB.NET
问题描述
大家好
我正在创建一个名为图书馆管理系统"的项目,但是当我想在系统中添加书籍时,我的程序无法正常工作.它给了我一些错误. 这是我的代码,请检查一下并告诉我我的问题是什么:
I am making a project called Library Management System but my program doesn`t work when i want to add books in the system. It gives me some errors. Here is my the code and please check this and tell me what is wrong in my it:
Public Class AddBook
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.DialogResult = Windows.Forms.DialogResult.Cancel
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox2.Text.Trim = "" Then
MsgBox("გთხოვთ შეიყვანოთ წიგნის სახელი", MsgBoxStyle.Critical Or MsgBoxStyle.OkOnly, "დაფიქსირდა შეცდომა")
TextBox2.Focus()
Exit Sub
End If
Try
Dim TA As New POSDSTableAdapters.BooksTableAdapter
TA.ToString.Insert(TextBox1.Text,textbox2.text, textbox3.text , textbox4.text , textbox5.text , BookNo , BookName , BookAuthor , BookSubject , BookLocation , OtherInfo)
Me.DialogResult = Windows.Forms.DialogResult.OK
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical Or MsgBoxStyle.OkOnly, "დაფიქსირდა შეცდომა")
End Try
End Sub
Private Sub AddBook_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
对于数据库,我正在使用MS Access.我已经创建了一个名为books的表,并且在此表中,我具有BookID,BookNo,BookName,BookAuthor,BookAuthor,BookSubject,BookLocation和OtherInfo.
for database i am using MS Access. I have made a table called books and in this table i have BookID, BookNo, BookName, BookAuthor, BookAuthor, BookSubject , BookLocation and OtherInfo.
请帮助我
对不起,我的英语:)
推荐答案
什么错误?它们在哪里发生?请阅读此主题,然后编辑您的帖子:
What errors? Where do they occur? Please read this thread and then edit your post:
http://social.msdn.microsoft .com/Forums/zh-CN/vbgeneral/thread/36cfcded-06ea-4163-9c82-1bf35c510c6d
这篇关于请在VB.NET中帮助我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!