本文介绍了我该如何纠正错误:找不到可安装的ISAM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<pre> If Sender_s_AddressTextBox.Text = "" Or Sender_s_NameTextBox.Text = "" Or
            Sender_s_IDTextBox.Text = "" Or Sender_s_Contact_NumberTextBox.Text = "" Or Receiver_s_NameTextBox.Text = "" Or
            Receiver_s_IDTextBox.Text = "" Or Receiver_s_AddressTextBox.Text = "" Or Receiver_s_Contact_NumberTextBox.Text = "" Or txttotalamount.Text = "" Then
            MsgBox("Please complete the information needed.")

        ElseIf Sender_s_AddressTextBox.Text = Text And Sender_s_NameTextBox.Text = Text And Sender_s_IDTextBox.Text = Text And
            Sender_s_Contact_NumberTextBox.Text = Text And Receiver_s_NameTextBox.Text = Text And Receiver_s_IDTextBox.Text = Text And
            Receiver_s_Contact_NumberTextBox.Text = Text And Receiver_s_AddressTextBox.Text = Text And
            txttotalamount.Text = Text Then
            MsgBox("Transaction has been processed.")

        End If
        Try
            cmd = New OleDb.OleDbCommand
            With cmd
                .Connection = con
                .CommandType = CommandType.Text
                .CommandText = "INSERT INTO tblSender (Sender’s Name,Sender''s ID, Sender''s Contact Number, Sender''s Address)
            VALUES (@Sender’s Name,@Sender''s ID,@Sender''s Contact Number,@Sender''s Address)"
                .CommandText = "INSERT INTO tblReceiver (Receiver''s Name, Receiver''s Contact Number, Receiver''s ID, Receiver''s Address)
            VALUES (@Receiver''s Name, @Receiver''s Contact Number, @Receiver''s ID, @Receiver''s Address )"

                .Parameters.Add(New System.Data.OleDb.OleDbParameter("@Sender’s Name ", System.Data.OleDb.OleDbType.VarChar, 255, Me.Sender_s_NameTextBox.Text))
                .Parameters.Add(New System.Data.OleDb.OleDbParameter("@Sender''s ID ", System.Data.OleDb.OleDbType.VarChar, 255, Me.Sender_s_IDTextBox.Text))
                .Parameters.Add(New System.Data.OleDb.OleDbParameter("@Sender''s Contact Number ", System.Data.OleDb.OleDbType.VarChar, 255, Me.Sender_s_Contact_NumberTextBox.Text))
                .Parameters.Add(New System.Data.OleDb.OleDbParameter("@Sender''s Address ", System.Data.OleDb.OleDbType.VarChar, 255, Me.Sender_s_AddressTextBox.Text))

                .Parameters.Add(New System.Data.OleDb.OleDbParameter("@Receiver''s Name ", System.Data.OleDb.OleDbType.VarChar, 255, Me.Receiver_s_NameTextBox.Text))
                .Parameters.Add(New System.Data.OleDb.OleDbParameter("@Receiver''s ID ", System.Data.OleDb.OleDbType.VarChar, 255, Me.Receiver_s_IDTextBox.Text))
                .Parameters.Add(New System.Data.OleDb.OleDbParameter("@Receiver''s Contact Number ", System.Data.OleDb.OleDbType.VarChar, 255, Me.Receiver_s_Contact_NumberTextBox.Text))
                .Parameters.Add(New System.Data.OleDb.OleDbParameter("@Receiver''s Address ", System.Data.OleDb.OleDbType.VarChar, 255, Me.Receiver_s_AddressTextBox.Text))

                '' RUN THE COMMAND
                cmd.Parameters("@Sender’s Name ").Value = Me.Sender_s_NameTextBox.Text
                cmd.Parameters("@Sender''s ID ").Value = Me.Sender_s_IDTextBox.Text
                cmd.Parameters("@Sender''s Contact Number ").Value = Me.Sender_s_Contact_NumberTextBox.Text
                cmd.Parameters("@Sender''s Address ").Value = Me.Sender_s_AddressTextBox.Text

                cmd.Parameters("@Receiver''s Name ").Value = Me.Receiver_s_NameTextBox.Text
                cmd.Parameters("@Receiver''s ID ").Value = Me.Receiver_s_IDTextBox.Text
                cmd.Parameters("@Receiver''s Contact Number ").Value = Me.Receiver_s_Contact_NumberTextBox.Text
                cmd.Parameters("@Receiver''s Address ").Value = Me.Receiver_s_AddressTextBox.Text

                con = New System.Data.OleDb.OleDbConnection()
                con.ConnectionString = "Provider= Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\common\Documents\Database2.accdb;Integrated
 Security=SSPI;User Instance=True"
                con.Open()
                cmd.ExecuteNonQuery()
                con.Close()
                Exit Sub
            End With
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical)
        End Try



我尝试过的事情:

编码很多代码,什么都没发生.



What I have tried:

encode a lot of codes and nothing happened

推荐答案


这篇关于我该如何纠正错误:找不到可安装的ISAM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 13:22