使用Visual Basic向Access数据库添加记录

时间:2014-08-04 23:51:59

标签: database vb.net vb.net-2010

以下是添加按钮的代码:

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'TODO: This line of code loads data into the '_PS_Database___Gawa_ni_arrah___Gamitin_sa_Database_ng_VBDataSet.PS_Tracking_System' table. You can move, or remove it, as needed.
    Me.PS_Tracking_SystemTableAdapter.Fill(Me._PS_Database___Gawa_ni_arrah___Gamitin_sa_Database_ng_VBDataSet.PS_Tracking_System)

End Sub

Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
    Me.Validate()
    Me.PS_Tracking_SystemBindingSource.EndEdit()
    Me.TableAdapterManager.UpdateAll(Me._PS_Database___Gawa_ni_arrah___Gamitin_sa_Database_ng_VBDataSet)
    MsgBox("Record Details Saved Successfully")
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Me.PS_Tracking_SystemTableAdapter.Insert(IDTextBox.Text, Reference_NumberTextBox.Text, APP_Reference_NumberTextBox.Text, End_User___Project_Management_OfficeTextBox.Text, Package_Lot_Item_ClusterTextBox.Text, ABCTextBox.Text, Funding_SourceTextBox.Text, BAC_Secretariat_ResponsibleTextBox.Text, Personnel_in_ChargeTextBox.Text, Project_NumberTextBox.Text, Type_of_ProcurementTextBox.Text, Method_of_PrpcurementTextBox.Text, Cost_of_Bidding_DocumentsTextBox.Text, Notice_of_Pre_Bid_ConferenceTextBox.Text, Number_of_Bid_Bulletin_IssuedTextBox.Text, Remarks_on_Post_QualificationTextBox.Text, Contract_AmountTextBox.Text, Name_of_Supplier_Provider_ConstructorTextBox.Text, RemarksTextBox.Text, Released_toTextBox.Text, TextBox1.Text)
    Me.PS_Tracking_SystemTableAdapter.Fill(Me._PS_Database___Gawa_ni_arrah___Gamitin_sa_Database_ng_VBDataSet.PS_Tracking_System)
    MsgBox("Record Added Successfully")
    IDTextBox.Text = ""
    Reference_NumberTextBox.Text = ""
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    Me.Close()

End Sub

结束班

示例错误消息为:

错误1未为参数' _Contract_Purchase_Oreder_No'指定参数of' Public Overridable Overloads Function Insert(ID As Integer?,Reference_Number As String,APP_Reference_Number As String,_End_User___Project_Management_Office As String,Project_TItle As String,_Package_Lot_Item_Cluster As String,ABC As String,Funding_Source As String,Date_Received_by_PS As String,BAC_Secretariat_Responsible As串,Personnel_in_Charge作为字符串,PROJECT_NUMBER作为字符串,_Pre_Proc_Date作为字符串,Type_of_Procurement作为字符串,Method_of_Prpcurement作为字符串,Date_of_Approval_of_BAC_Resolution_for_AMP作为字符串,Date_of_Advertisement_in_Newspaper作为字符串,Date_of_Posting_in_PhilGEPS作为字符串,Date_of_Posting_in_DepEd_Website_and_Bulletin_Board作为字符串,Cost_of_Bidding_Documents作为字符串,Date_of_Pre_Bid_Conference作为字符串,Notice_of_Pre_Bid_Conference作为字符串, Number_of_Bid_Bulletin_Issued As String,Deadline_of_Submission_and_Opening_of_Bids As String,Date_of_Bid_Evaluation As String,_Deadline_of_Post_Qualification As String,Remarks_on_Po st_Qualification作为字符串,Date_of_Preparation_of_RTA作为字符串,Date_of_Approval_of_RTA作为字符串,Date_of_Preparation_of_NOA作为字符串,Date_of_Acceptance_of_NOA作为字符串,_Contract_Purchase_Oreder_No作为字符串,Contract_Amount作为字符串,_Name_of_Supplier_Provider_Constructor作为字符串,Date_of_Preparation_of_NTP作为字符串,Date_of_Acceptance_of_NTP作为字符串,备注作为字符串,Other_Document_Particulars作为字符串,ACTION_TAKEN作为String,Date_Released_from_PS As String,Released_to As String)As Integer'。 C:\ Documents and Settings \ Jag Flores \ Desktop \ Jag - Visual Basic跟踪系统 - 最新080414 923AM \ WindowsApplication3 \ Form1.vb 17 9 WindowsApplication3

我发布了我的界面链接以获取更多信息: 表格1:http://i158.photobucket.com/albums/t118/ajjose/form1.jpg 表格2:http://i158.photobucket.com/albums/t118/ajjose/form2.jpg

提前致谢:/

0 个答案:

没有答案
相关问题