Solved

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

Posted on 2007-11-28
3
242 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
Comment Utility
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
Comment Utility
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
Comment Utility
How do I get the ID and can you provide a sample UPDATE statement?
Thank you.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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