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 7404623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:16:52+00:00 2026-05-29T05:16:52+00:00

I have an ASP.NET Web Application using SQL Server 2008. When a post code

  • 0

I have an ASP.NET Web Application using SQL Server 2008.

When a post code is submitted through the web application, it is encrypted, and then the encrypted value is sent to the database and inserted into a table.

I now need to find a way of querying these post codes from the web application by searching for parts of the post code like:

SELECT PostCode
FROM Table
WHERE PostCode LIKE @PostCode + '%'

How can I do this without storing a decryption function on the database? (Which I believe is bad for security?)

  • 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-05-29T05:16:53+00:00Added an answer on May 29, 2026 at 5:16 am

    There are really only two options here.

    1. Encrypt the data you are submitting to your select query. That way you are comparing two different encrypted values. Of course, this will fail if you are using a salt..

    2. Don’t encrypt the values prior to storage. Instead, just save it normally. If it really does need to be encrypted, use the encryption methods available within SQL Server to automatically encrypt the column: http://msdn.microsoft.com/en-us/library/ms179331.aspx

    The purpose of your encryption is basically to protect information “at rest”. SQL server can do this by itself.

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

Sidebar

Related Questions

I have an asp.net web application written in C# using a SQL Server 2008
I have an ASP.NET MVC Web Application that interacts with a SQL Server 2008
I have a small web application in asp.net and I'm using SQL Server. How
We are developing a web application using asp.net and sql server. We are required
If I have an ASP.NET web app using impersonation and a SQL Server connectionstring
I need to write a web application using SQL Server 2005, asp.net, and ado.net.
We are building ASP.NET MVC3 web applications using Visual Studio, SQL Server 2008 R2
I have created a web application using ASP.NET MVC3 in Visual studio (no SQL
I've started building a ASP net MVC 2.0 web application using SQL Express 2008
I am developing a web application using ASP .NET 2.0, VS 2008 and SQL

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.