Insert & Find a specifi row

Posted on 2006-04-24
Last Modified: 2010-04-23
Can someone show me how to insert new records and find a specific row  both SQL and ACCESS database?
Question by:VBdotnet2005
    1 Comment
    LVL 2

    Accepted Solution

    To insert:

    INSERT INTO table_name (column1, column2,...)
    VALUES (value1, value2,....)

    To find:

    SELECT column FROM table
    WHERE column = value

    Those will be your query string.

    First, make a connection to your DB, then execute the command:
    Dim conn as sqlconnection = new sqlconnection("connection string")
    Dim cmd as sqlcommand = new sqlcommand("query string", conn)

    to insert:

    to find:
    Dim reader as sqldatareader

        'reader("column name")             that will access the specified column name, row by row
    end while

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
    Article by: Kraeven
    Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now