0
    Dim conn As New OleDb.OleDbConnection

    Dim ds As New DataSet
    Dim dt As New OleDb.OleDbDataAdapter
    conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\admin\Documents\Visual Studio 2010\Projects\office software\office software\bin\Debug\Office1.accdb;Persist Security Info=False; "

    Try
        cmd.Connection = conn
        conn.Open()
        cmd.CommandText = "insert into Office Values('" & CInt(TBID.Text) & "','" & TBSupplierName.Text & "', " & TBProductName.Text & "," & CInt(TbProductNumber.Text) & "," & CInt(TbProductPrice.Text) & ",conn)"
        MsgBox("Data Entered successuflly", MsgBoxStyle.Information)
        dt.SelectCommand = cmd
        dt.Fill(ds)
        conn.Close()

    Catch ex As Exception

        MsgBox(ex.Message & "Data is Not Entered" & ex.Source, MsgBoxStyle.Critical)

    End Try

End Sub

Edited by pritaeas: Fixed markdown.

2
Contributors
1
Reply
5
Views
4 Years
Discussion Span
Last Post by pritaeas
0

No value given for one or more required parameters

One of your function calls misses a parameter. Which line does the error occur on?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.