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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:05:00+00:00 2026-05-27T07:05:00+00:00

hi im trying to program a query to select data by employee id, but

  • 0

hi im trying to program a query to select data by employee id, but when there are no entries in the table, i get a error. i understand i can use IgnoreResourceNotFoundException=true, but i do not know where to insert this code. hope you guys can help.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.StorageClient;
using Microsoft.WindowsAzure.ServiceRuntime;
using System.IO;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;

namespace MessageBoard_Data
{
public class MessageBoardDataSource
{


private const string messageTableName = "MessageTable";
private const string connectionStringName = "DataConnectionString";
private static CloudStorageAccount storageAccount;
private CloudTableClient tableClient;
private const string messageImageBlobName = "golfermessageboardpics";
private CloudBlobClient blobClient;
private CloudBlobContainer blobContainer;
private const string messageQueueName = "golfermessageboardqueue"; 
private CloudQueueClient queueClient;
private CloudQueue queue;


public MessageBoardDataSource()
{
string connectionString = RoleEnvironment.
GetConfigurationSettingValue(connectionStringName);

storageAccount = CloudStorageAccount.Parse(connectionString);

tableClient = new CloudTableClient(storageAccount.TableEndpoint.
AbsoluteUri,storageAccount.Credentials);

tableClient.RetryPolicy = RetryPolicies.Retry(3, TimeSpan.FromSeconds(1));
tableClient.CreateTableIfNotExist(messageTableName);



blobClient = storageAccount.CreateCloudBlobClient();
blobContainer = blobClient.GetContainerReference(messageImageBlobName);
blobContainer.CreateIfNotExist();


var permissions = blobContainer.GetPermissions();
permissions.PublicAccess = BlobContainerPublicAccessType.Container;
blobContainer.SetPermissions(permissions);
queueClient = storageAccount.CreateCloudQueueClient();
queue = queueClient.GetQueueReference(messageQueueName);
queue.CreateIfNotExist();


}
public IEnumerable<MessageBoardEntry> GetEntriesbyid(string EmployeeID)
{
TableServiceContext tableServiceContext = tableClient.GetDataServiceContext();
tableServiceContext.IgnoreMissingProperties = true;
tableServiceContext.IgnoreResourceNotFoundException = true;
var results = from h in   tableServiceContext.CreateQuery
<MessageBoardEntry>(messageTableName)
where h.EmployeeID == EmployeeID
select h;
return results;
}
  • 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-27T07:05:01+00:00Added an answer on May 27, 2026 at 7:05 am
    var context = tableClient.GetDataServiceContext();
    context.IgnoreMissingProperties = true;
    

    Then query the context as you intend and it will return null if not found from then on when you query the context.

    Update:
    If this is a newly created table you may be running into a known issue with the development Storage Emulator.

    You may need to add a dummy item into your table before using it for the first time to ensure that it knows what the schema is. So try the steps in the following post: http://deeperdesign.wordpress.com/2010/03/10/azure-table-storage-what-a-pain-in-the-ass/

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

Sidebar

Related Questions

Imagine we have a program trying to write to a particular file, but failing.
My program is trying to create an key on the HKLM\Software\Microsoft\Shared Tools\MSCONFIG\startupreg\test\ but instead
I'm trying to write a program that cleans data, using Matlab. This program takes
I'm using the MySql.Data dll from MySql and trying to execute a query to
I am trying to use snort's schema and extract information relevant to my program.
I am trying to query the install location of a program in the registry.
I'm trying to get a query to compare two tables by LEFT OUTER JOINing
Effectively a duplicate of: How can I display data in table with Perl The
I am trying to use a value that I receive from a MySQL query
I'm having trouble with a query I'm trying to do. I'm trying to select

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.