Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 57199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:39:14+00:00 2026-05-10T17:39:14+00:00

I have an UPDATE sql command that modifies a Date/Time field in a particular

  • 0

I have an UPDATE sql command that modifies a Date/Time field in a particular table. This table has two keys, ProductionCode and TestTime, which is what is being modified. The Production Code never changes for a particular record, but often a user will find that they entered the wrong test time and need to change it.

I have the updated time which I can retrieve from the datagrid, however, I need to select the right record to change. In order to do that, one of my where criteria has to be the current time that that record is set at in the database.

Currently, I keep an array of old times, which are updated whenever an UPDATE command is run. So in the WHERE block of the sql command, the old time is used. Once its updated in the database, then I update the time array. The difficulties come in when times are entered out of order, or when the datagrid is sorted on a different field than the time. I have to keep track of what order all the old times are in corresponding to the data grid rows, and its caused a number of bugs in the past. Currently it works fine, but its delicate at best.

So what I’m really looking for is a better solution. Should I just store the results of the SELECT statement that is used to populate the UI, and rely on them? Currently, the only place my database results go, is directly into the datagrid. Or is there another way? I have avoided automatic data binding in favor of manually using SQL commands because my datagrids are dynamically configured and use different schemas from one load to the next, and the only columns guaranteed to be there are the ProductionCode and the TestTime.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:39:14+00:00Added an answer on May 10, 2026 at 5:39 pm

    Add a new column ‘id’ that holds a unique number that can identify each row. If your users need to modify the primary key you have probably not chosen a good primary key?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 142k
  • Answers 142k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Its is not possible out of box. But it can… May 12, 2026 at 8:15 am
  • Editorial Team
    Editorial Team added an answer The same question could be asked of long to double… May 12, 2026 at 8:15 am
  • Editorial Team
    Editorial Team added an answer We decided that we didn't want to make any modifications… May 12, 2026 at 8:15 am

Related Questions

I have a trigger that gets inserts and updates to a view. I need
I have a fairly small MySQL database (a Textpattern install) on a server that
If I have an instance of a persistence object, and I set some members
I have an OLE DB Command component in an SSIS Package that runs an

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.