?
Solved

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

Posted on 2007-11-28
3
Medium Priority
?
260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 25

Accepted Solution

by:
imitchie earned 800 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 200 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
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 …
Suggested Courses

771 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