Learn how to a build a cloud-first strategyRegister Now


Insert & Find a specifi row

Posted on 2006-04-24
Medium Priority
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

Accepted Solution

af4643 earned 1000 total points
ID: 16534044
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

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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

810 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