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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:58:17+00:00 2026-06-13T21:58:17+00:00

We have a use case where an app that sends out emails finds a

  • 0

We have a use case where an app that sends out emails finds a specific string (‘smart tag’) in an email and replaces it with the results of a stored procedure.

So for example the email could have Dear <ST:Name> in the body, and then the code would identify this string, run the stored procedure to find the client name passing in the client id as a parameter.

The list of these tags and the stored procedures that need to be run are currently hard coded, so every time a new ‘smart tag’ needs to be added, a code change and deployment is required.

Our BA’s our skilled in SQL and want to be able to add new tags manually.

Is it bad practice to store the procedure and parameters in a database table? Would this be a suitable design for such a table? Would it be necessary to store parameter type?

SmartTag

SmartTagId   SmartTag   StoredProcedure

SmartTagParameters

SmartTagParameterId   SmartTagId   ParameterName
  • 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-13T21:58:18+00:00Added an answer on June 13, 2026 at 9:58 pm

    Table driven configuration, data driven programming, is good.

    The primary thing to watch out for is SQL Injection risk (or in your case it would be called ‘tag injection’…): one could use the email as an attack vector to gain elevated privileges by inserting a crafted procedure that would be run under higher privileges. Note that this is more than just the usuall caution around SQL Injection, since you are already accepting arbitrary code to be executed. This is more of a sandboxing problem.

    Typical problems are from the type system: parameters have various types but the declaration tables have a string type for them. SQL_VARIANT can help.

    Another potential problem is the language to declare and discover tags. Soon you’ll be asked to recognize <tag:foo>, but only before <tag:bar>. A fully fledged context sensitive parser usually follows shortly after first iteration… It would be helpful if you can help by leveraging something already familiar (eg. think how JQuery uses the CSS selector syntax). HTMLAgilityPack could help you perhaps (and btw, this is a task perfect for SQLCLR, don’t try to build elaborate statefull parser in T-SQL…).

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

Sidebar

Related Questions

Here's my use case. I have a desktop app that can download from my
I have the following use case: There's a class called Template and with that
I'm just starting to learn AspectJ, and I have use-case for say, User login.
I have following use-case: there are several assemblies decorated with ProtoContract classes and I
I have a use case where I need to call a (non-static) method in
I have a use case where I am setting the page focus to a
I have a use case where if a number lies between 0-10 it should
I have this use case of an xml file with input like Input: <abc
I have a use case with NServiceBus explained in this question. Essentially there is
I have a use case where I only need to store certain fields to

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.