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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:25:13+00:00 2026-06-03T05:25:13+00:00

I am using the following situation: cmd.CommandText = insert into city (id, code, name,

  • 0

I am using the following situation:

cmd.CommandText = "insert into city (id, code, name, uf) values ??(@ id, @ code, @ name, @ uf);"

I wonder what would bring me in command after the format string supplied to the parameters

situation:

insert into city (id, code, name, uf) values ??(5, 5, 'BIG COUNTRY', 'MS'); – for example

After the parameters have fed as I get this “string” already fed and move to a string??

My idea is to create a log, so need to get the parameters already filled in to generate a system log!

  • 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-03T05:25:15+00:00Added an answer on June 3, 2026 at 5:25 am

    If you’re using SQL Server, have you considered using SQL Server Profiler instead? If you’re not using SQL Server, other RBDMS systems should have similar tools…

    It would probably be less effort than adding this type of logging into your application, and it would also guarantee that you’re seeing what is actually sent to your database, and that your logging code hasn’t accidentally misinterpreted and incorrectly logged the query.

    If you have an aversion to profiling, which would be justified if we’re talking about a production database that won’t be able to handle the overhead of profiling, you could assemble your log with something similar to the following:

    var query = cmd.CommandText;
    
    foreach (var p in cmd.Parameters)
    {
        query = query.Replace(p.ParameterName, p.Value.ToString());
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using SVN (TortoiseSVN) and often came into the following situation: I wanted to
Using following code I try to get updated list of checkbuttons' corresponding text values,
I have the following situation: using a classical Java server (using ServerSocket) I would
I using following code: var search = 'test'; if ($('#sku').find(search) ){ //alert(search); $(document).find(search).css('color','red'); <TABLE>
I am using following code to handle all the unhandled exceptions in the program.
I am using following code to remove some specific nodes from xml file..It show
I am using following PHP code to connect to MS Access database: $odb_conn =
I am using following code in rowdatabound function. Protected Sub gvwMileStone_RowDataBound(ByVal sender As System.Object,
I'm using following peace of code to output an array: echo ======output without array_unique=====;
I have the following situation on my new ASP.Net page: I am using a

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.