Advertisement

07.02.2008 at 03:20PM PDT, ID: 23535332
[x]
Attachment Details

INSERTS and parameters in visual basic 2005

Asked by systems_ax in Visual Studio .NET 2005, Visual Basic Programming, Microsoft Visual Basic.Net

how do I implemet a parameter for my INSERT statement.
i know that I use the following for an UPDATE, but cannot find any info on how to do the insert.

this is my update code:
sql = "update tblClients set ClientFirstName= @ClientFirstName, ClientLastName= @ClientLastName, ClientMiddleName= @ClientMiddleName where ClientId= @clientID"
                    Dim command As New OleDbCommand(sql, conn)
                    command.Parameters.AddWithValue("@ClientFirstName", txtFirst.Text)
                    command.Parameters.AddWithValue("@ClientLastName", txtLast.Text)
                    command.Parameters.AddWithValue("@ClientMiddleName", txtMiddle.Text)
                    command.Parameters.AddWithValue("@ClientId", _clientID)

thank youStart Free Trial
[+][-]07.02.2008 at 03:23PM PDT, ID: 21921399

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 03:23PM PDT, ID: 21921400

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Studio .NET 2005, Visual Basic Programming, Microsoft Visual Basic.Net
Sign Up Now!
Solution Provided By: CMYScott
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.02.2008 at 03:24PM PDT, ID: 21921404

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.02.2008 at 03:27PM PDT, ID: 21921411

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628