Results 1 to 2 of 2

Thread: How to implement an insert update delete query

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    May 2008
    Posts
    48

    How to implement an insert update delete query

    hey,
    i have just made an insert query

    INSERT INTO Customer
    (Firstname, Lastname, Address, Postalcode, Phone, City, CheckedID, NormalAccount, StandardAccount)
    VALUES (@Firstname,@Lastname,@Address,@Postalcode,@Phone,@City,@CheckedID,@NormalAccount,@StandardAccount);
    SELECT CustomerID, Firstname, Lastname, Address, Postalcode, Phone, City, CheckedID, NormalAccount, StandardAccount FROM Customer WHERE (CustomerID = SCOPE_IDENTITY())

    now i would appreciate some help on how to get it to work on the form i have created, what is the code that i should use to try and make this query work,
    i tried using
    Try
    Me.Validate()
    Me.CustomerBindingSource.EndEdit()
    Me.TableAdapterManager.UpdateAll(Me.LibraryDatabaseDataSet)
    Me.CustomerTableAdapter.insertquery(Me.LibraryDatabaseDataSet.Customer)

    MsgBox("Update Successful")
    Catch ex As Exception

    MsgBox("Update failed")
    End Try

    but i get errors!! like this one below

    Argument not specified for parameter 'City' of 'Public Overridable Overloads Function insertquery(Firstname As String, Lastname As String, Address As String, Postalcode As Decimal, Phone As Decimal, City As String, CheckedID As Integer?, NormalAccount As Integer?, StandardAccount As Integer?) As Integer'.

    SOMEONE PLEASE HELP!!!!!
    Last edited by tgore555; May 16th, 2008 at 01:01 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width