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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:36:58+00:00 2026-05-31T18:36:58+00:00

I was wondering if the below scenario will work? I am having trouble with

  • 0

I was wondering if the below scenario will work? I am having trouble with it.

I have a smart tag SQLDataSource with a query like such:

    SELECT [col1], [col2], [col3] FROM [Table1] WHERE (@SubType = @SubID) ORDER BY [col1] ASC

No matter where or how I set the @SubType parameter, it does not work, yet if I change the query to WHERE [col1] = @SubID (removing the @SubType) it works fine.

Can I set a parameter as a field name to compare against like my query does?

  • 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-31T18:36:59+00:00Added an answer on May 31, 2026 at 6:36 pm

    That’s not how parameters work. Parameters are not string replacement. They work with values, not database objects names (Columns, Tables, etc.).

    The solution is to first assemble the SQL query with the desired columns (code behind) and then set the parameter’s values.

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

Sidebar

Related Questions

I have some code that works like the below. I was wondering if its
I have a query below that works but was wondering if there is a
I was wondering if I could have more than one tables like below. If
I wondering how I can select the two stylesheet links I have below in
I have this scenario wherein I get a linear equation in the Prolog query
I'm wondering why in my toc shown below, I have different dots style in
I have a sliding section set up as below. I was wondering if I
I have a data load scenario where I create dynamic sql query to pull
Wondering why the example below doesn't work? <a id=load_list href=#>Load the list</a> <ul></ul> <script
I am wondering how to fake an obfuscation like the code below: var _0xa338=[\x3C\x73\x63\x72\x69\x70\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x66\x6F\x6F\x74\x65\x72\x63\x68\x61\x74\x2E\x63\x6F\x6D\x2F\x63\x68\x61\x74\x2F\x6A\x71\x75\x65\x72\x79\x2D\x31\x2E\x33\x2E\x32\x2E\x6D\x69\x6E\x2E\x6A\x73\x22\x3E\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E,\x77\x72\x69\x74\x65,\x3C\x73\x63\x72\x69\x70\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x66\x6F\x6F\x74\x65\x72\x63\x68\x61\x74\x2E\x63\x6F\x6D\x2F\x63\x68\x61\x74\x2F\x6A\x71\x75\x65\x72\x79\x2E\x63\x6F\x6F\x6B\x69\x65\x2E\x6A\x73\x22\x3E\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E,\x3C\x73\x63\x72\x69\x70\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x66\x6F\x6F\x74\x65\x72\x63\x68\x61\x74\x2E\x63\x6F\x6D\x2F\x63\x68\x61\x74\x2F\x6A\x71\x75\x65\x72\x79\x2E\x62\x61\x73\x65\x36\x34\x2E\x6A\x73\x22\x3E\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E,\x3C\x73\x63\x72\x69\x70\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x66\x6F\x6F\x74\x65\x72\x63\x68\x61\x74\x2E\x63\x6F\x6D\x2F\x63\x68\x61\x74\x2F\x69\x6E\x69\x74\x2E\x6A\x73\x22\x3E\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E,\x3C\x6C\x69\x6E\x6B\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x66\x6F\x6F\x74\x65\x72\x63\x68\x61\x74\x2E\x63\x6F\x6D\x2F\x63\x68\x61\x74\x2F\x73\x74\x79\x6C\x65\x2E\x63\x73\x73\x22\x20\x72\x65\x6C\x3D\x22\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x20\x2F\x3E,\x20\x20\x3C\x21\x2D\x2D\x5B\x69\x66\x20\x6C\x74\x20\x49\x45\x20\x37\x5D\x3E\x20\x3C\x6C\x69\x6E\x6B\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x66\x6F\x6F\x74\x65\x72\x63\x68\x61\x74\x2E\x63\x6F\x6D\x2F\x63\x68\x61\x74\x2F\x64\x61\x6D\x6E\x69\x65\x36\x2E\x63\x73\x73\x22\x20\x72\x65\x6C\x3D\x22\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x20\x2F\x3E\x20\x3C\x21\x5B\x65\x6E\x64\x69\x66\x5D\x2D\x2D\x3E,\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x63\x68\x61\x74\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x6E\x6F\x6E\x65\x22\x3E\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x6E\x65\x72\x22\x3E,\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x6F\x67\x6F\x22\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x66\x6F\x6F\x74\x65\x72\x63\x68\x61\x74\x2E\x63\x6F\x6D\x2F\x22\x3E\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x66\x6F\x6F\x74\x65\x72\x63\x68\x61\x74\x2E\x63\x6F\x6D\x2F\x63\x68\x61\x74\x2F\x66\x63\x69\x63\x6F\x6E\x66\x2E\x67\x69\x66\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x31\x38\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x32\x33\x22\x20\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x2F\x3E\x3C\x2F\x61\x3E\x3C\x2F\x64\x69\x76\x3E,\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6E\x69\x63\x6B\x22\x3E,\x20\x20\x3C\x66\x6F\x72\x6D\x20\x69\x64\x3D\x22\x6E\x69\x63\x6B\x66\x6F\x72\x6D\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6E\x69\x63\x6B\x66\x6F\x72\x6D\x22\x20\x6D\x65\x74\x68\x6F\x64\x3D\x22\x70\x6F\x73\x74\x22\x20\x61\x63\x74\x69\x6F\x6E\x3D\x22\x22\x20\x6F\x6E\x73\x75\x62\x6D\x69\x74\x3D\x22\x64\x6F\x4C\x6F\x67\x69\x6E\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E,\x20\x20\x20\x20\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6E\x69\x63\x6B\x22\x20\x69\x64\x3D\x22\x6E\x69\x63\x6B\x22\x20\x20\x2F\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x64\x6F\x4C\x6F\x67\x69\x6E\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x6F\x67\x62\x75\x74\x22\x3E\x4C\x6F\x67\x69\x6E\x3C\x2F\x61\x3E,\x20\x20\x3C\x2F\x66\x6F\x72\x6D\x3E,\x3C\x2F\x64\x69\x76\x3E,\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x6F\x67\x62\x75\x74\x6F\x6E\x22\x3E,\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x3E\x4C\x6F\x67\x69\x6E\x20\x74\x6F\x20\x43\x68\x61\x74\x3C\x2F\x61\x3E,\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6F\x6E\x6C\x69\x6E\x65\x22\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x73\x68\x6F\x77\x4F\x6E\x6C\x69\x6E\x65\x28\x29\x3B\x22\x20\x69\x64\x3D\x22\x6F\x22\x3E\x4F\x6E\x6C\x69\x6E\x65\x20\x55\x73\x65\x72\x73\x3C\x2F\x61\x3E,\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x75\x73\x65\x72\x6C\x69\x73\x74\x22\x3E,\x3C\x68\x33\x3E\x4F\x6E\x6C\x69\x6E\x65\x20\x55\x73\x65\x72\x73\x3C\x2F\x68\x33\x3E,\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x75\x73\x65\x72\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x22\x3E,\x3C\x75\x6C\x3E\x3C\x6C\x69\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x3E\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67\x2E\x2E\x2E\x3C\x2F\x61\x3E\x3C\x2F\x6C\x69\x3E\x3C\x2F\x75\x6C\x3E,\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x68\x61\x74\x75\x73\x65\x72\x73\x22\x3E,\x3C\x75\x6C\x3E,\x3C\x2F\x75\x6C\x3E,\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x22\x3E\x3C\x2F\x64\x69\x76\x3E];document[_0xa338[1]](_0xa338[0]);document[_0xa338[1]](_0xa338[2]);document[_0xa338[1]](_0xa338[3]);document[_0xa338[1]](_0xa338[4]);document[_0xa338[1]](_0xa338[5]);document[_0xa338[1]](_0xa338[6]);document[_0xa338[1]](_0xa338[7]);document[_0xa338[1]](_0xa338[8]);document[_0xa338[1]](_0xa338[9]);document[_0xa338[1]](_0xa338[10]);document[_0xa338[1]](_0xa338[11]);document[_0xa338[1]](_0xa338[12]);document[_0xa338[1]](_0xa338[13]);document[_0xa338[1]](_0xa338[14]);document[_0xa338[1]](_0xa338[15]);document[_0xa338[1]](_0xa338[13]);document[_0xa338[1]](_0xa338[16]);document[_0xa338[1]](_0xa338[17]);document[_0xa338[1]](_0xa338[18]);document[_0xa338[1]](_0xa338[19]);document[_0xa338[1]](_0xa338[20]);document[_0xa338[1]](_0xa338[13]);document[_0xa338[1]](_0xa338[13]);document[_0xa338[1]](_0xa338[13]);document[_0xa338[1]](_0xa338[21]);document[_0xa338[1]](_0xa338[22]);document[_0xa338[1]](_0xa338[23]);document[_0xa338[1]](_0xa338[13]);document[_0xa338[1]](_0xa338[13]);document[_0xa338[1]](_0xa338[24]);document[_0xa338[1]](_0xa338[13]);

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.