Solved

How to insert data to the same record at different time?

Posted on 2007-11-28
3
249 Views
Last Modified: 2013-11-27
I have a program that search for various word (using Word 2003) and do a parameterized insert query to fill the database.  My problem is that I can search one word at a time and therefore insert to one field at a time.  I want to insert one field at a time but thought out the lengh of my procedure I want to insert to every filed of one record depend on my search criterias.
0
Comment
Question by:isischen
3 Comments
 
LVL 25

Accepted Solution

by:
imitchie earned 400 total points
ID: 20370699
after you insert to the first field, you need to get the ID back.
then for each field after the first, use an UPDATE statement with the ID you got.
0
 

Assisted Solution

by:Weddeh
Weddeh earned 100 total points
ID: 20370756
imitchie was right, you can't insert into the same record more than once.
You must query first from the database, if not exist then you can insert the record otherwise update it.
0
 

Author Comment

by:isischen
ID: 20371037
How do I get the ID and can you provide a sample UPDATE statement?
Thank you.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

929 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

10 Experts available now in Live!

Get 1:1 Help Now