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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:41:31+00:00 2026-05-28T04:41:31+00:00

Recently I have been writing parameterized queries like this: SQL = INSERT INTO myTable

  • 0

Recently I have been writing parameterized queries like this:

SQL = " INSERT INTO myTable (column1, column2, column3) VALUES (?, ?, ?); "

Set newParameter = cmdConn.CreateParameter("@column1", ad_Integer, ad_ParamInput, Len(input1), input1)
cmdConn.Parameters.Append newParameter
Set newParameter = cmdConn.CreateParameter("@column2", ad_Integer, ad_ParamInput, Len(input2), input2)
cmdConn.Parameters.Append newParameter
Set newParameter = cmdConn.CreateParameter("@column3", ad_Integer, ad_ParamInput, Len(input3), input3)
cmdConn.Parameters.Append newParameter

And I was of the understanding, that where I’ve used @column1 when appending a new parameter, this was allocating that parameter to that particular column in the query… but have recently been informed otherwise. This then caused some confusion and have a couple of questions.

Take the above parameter, @column1. How does that parameter know that it’s going to be used in the first question mark (?) of the query? Do I have to append the parameters in the same order as the question marks, or doesn’t it matter which order? Also, if I wanted to add the users input in to two columns, do I use two parameters or can I use the same one?

Any help gratefully received. This has been on my mind for weeks, so really looking forward to an explanation 🙂

  • 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-28T04:41:31+00:00Added an answer on May 28, 2026 at 4:41 am

    In parameterized queries, the database replaces the question marks with the parameters in the order in which they are added.

    So column1 parameter will go into question mark 1, column2 parameter will go into question mark 2, and column3 parameter will go into question mark 3

    For more check

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

Sidebar

Related Questions

I have recently been writing git hooks for my project team. I would like
Perhaps I am getting rusty (have been writing in Python recently). Why does this
I have been running into some troubles recently and I think I need your
I have been writing C code for many years, but I recently came accross
I have been writing command-line Python scripts for a while, but recently I felt
Recently, I have been writing many classes which have, apart from generic variant, some
Recently I have been writing a program in C++ that pings three different websites
I have been practicing TDD in C# for several years now and recently have
Recently I have been investigating the possibilities of caching in ASP.NET. I rolled my
Recently I have been studying recursion; how to write it, analyze it, etc. I

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.