Solved

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

Posted on 2007-11-28
3
256 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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
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…

820 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