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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:24:41+00:00 2026-06-02T05:24:41+00:00

I store encrypted email addresses in my Database and use the DoDecrypt Function of

  • 0

I store encrypted email addresses in my Database and use the DoDecrypt Function of mine, to display the unencrypted email addresses in a AspGrid

So my LINQ query is something like

Dim Query = From c In DB.Something Select New With {.Email = DoDecrypt(c.Email)}

Which returns a set of the emails in debug mode…

After using a Linq to datatable function the results returned are the ones found in the Database, which are the encrypted ones.

What is going wrong here?
How should i modify my Linq query?

And here is the Linq to datatable function

 Public Shared Function ToDataTable(DB As System.Data.Linq.DataContext, query As Object) As DataTable
        If query Is Nothing Then
            Throw New ArgumentNullException("query")
        End If

        Dim cmd As IDbCommand = DB.GetCommand(TryCast(query, IQueryable))
        Dim adapter As New SqlDataAdapter()
        adapter.SelectCommand = DirectCast(cmd, SqlCommand)
        Dim dt As New DataTable("sd")

        Try
            cmd.Connection.Open()
            adapter.FillSchema(dt, SchemaType.Source)
            adapter.Fill(dt)
        Finally
            cmd.Connection.Close()
        End Try
        Return dt
    End Function
  • 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-02T05:24:42+00:00Added an answer on June 2, 2026 at 5:24 am

    You need to actually resolve the query, it is late bound by default, but if you’re actually wanting to resolve the query, you need to just call .ToList(). I’ve just wrapped your query in brackets below and called .ToList() at the end. Not sure if this is the exact VB syntax (going from C# knowledge here), but the principal is still the same.

    Dim Query = (From c In DB.Something Select New With {.Email = DoDecrypt(c.Email)})
    .ToList()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it 'safe' to store cipher parameters in the (unencrypted) header of an encrypted
I have a requirement to store the data in encrypted form in database tables.
I'm working on a site that will store thousands of records of email addresses
Is it possible to store encrypted connection string so it can be used from
Are JKS (Java Key Store) files encrypted? Do they provide full protection for encryption
I am creating a program that needs to store the user's data in encrypted
I am going to use AES_ENCRYPT() and AES_DECRYPT to store patient data in an
what is PHP's safest encrypt/decrypt method, in use with MySQL - to store let's
STORE = { item : function() { } }; STORE.item.prototype.add = function() { alert('test
I store all session information in database. The user can login the system for

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.