Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-11-28
3
Medium Priority
?
262 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

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.
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

610 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