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

  • SEARCH
  • Home
  • 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 7833675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T12:49:49+00:00 2026-06-02T12:49:49+00:00

Assuming you want to write some data to a RFID card and some data

  • 0

Assuming you want to write some data to a RFID card and some data to a database.
Theoretically the connection to the database might break at any time and the connection between the card and the card reader might break at any time too.
Your goal is to design it in a kinda atomic way that you either end up with both or none being written.

Is there any elegant approach to solve this?
Any hints are appreciated 🙂

(I’m using MS SQL Server and the Windows Smart Card Module (Winscard.dll) in case it makes any difference)

  • 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. Editorial Team
    Editorial Team
    2026-06-02T12:49:55+00:00Added an answer on June 2, 2026 at 12:49 pm

    Insert a record before you start your update of the RFID card, then update this record when complete. In this way you’ll also be able to spot half-completed updates, and act accordingly.

    1. Insert a record into the database with a status of ‘incomplete’. Give it a timestamp, a unique id, and any other pertinent information you require to uniquely describe the RFID write attempt
    2. Write to RFID card
    3. Update the record inserted in step 1. with a ‘completed’ or ‘failure’ status

    Then have a process which resolves incomplete records after a timeout period has elapsed (either by trying again, or whatever else you want to do).

    Do not try to hold open a database transaction while you communicate with your RFID card, as this will:

    1. Give you unwanted (and potentially lengthy) locks on your database
    2. Rollback upon failure, which will remove any evidence you tried to do something to your RFID card
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My plugin takes some time doing something. So I want to listen to when
Essentially I want to create a script to deploy a database connection script to
Assuming I have some data in the form of Customer1 Name Address Order1 ID
Is this good OO Design assuming you want every inheriting class to be a
Assuming I have a column called A and I want to check if A
assuming that I know the PID of a process and want to do a
Assuming sr is an IEnumerable<string> , I want to use code like this to
I want to display a list of complex, but fixed-size multiline elements, assuming that
my question is: assuming we have a calendar_table with UNIX datestamp date_column, i want
I'm doing some work with the stackoverflow data set in Java and have a

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.