How to trace the Insert Query of Sql Data Source ?

Discussion in 'ASP .Net' started by Luqman, Jul 10, 2007.

  1. Luqman

    Luqman Guest

    I have created a Insert Query in Sql Data Source using Oracle Database, with
    the parameters, and its connected with DetailView Control.

    When I try to Insert through DetailView Control, Illegal Variable
    Name/Number Error occurs.

    Is there any way I can trace or display on screen, what exactly the query is
    being passed to the Oracle with the Values.

    For example: If my Sql datasource has following query.

    Insert into mytable(invoice_no,inv_date,item_no,qty)
    values:)invoice_no,:inv_date,:item_no,:qty)

    I need the query with the parameter values as under:-

    Insert into mytable(invoice_no,inv_date,item_no,qty)
    values(1241,'23-jun-2006',12,1200)

    How can I trace and display the above query with the parameter values ?

    I am using VS 2005.

    Best Regards,

    Luqman
    Luqman, Jul 10, 2007
    #1
    1. Advertising

  2. Parameters are processed by the database driver. I don't think you can see
    the actual sql at any point prior the driver gets the statement.

    Don't know much about Oracle tracing tools but there should be some, use
    them.

    --
    Eliyahu Goldin,
    Software Developer
    Microsoft MVP [ASP.NET]
    http://msmvps.com/blogs/egoldin
    http://usableasp.net


    "Luqman" <> wrote in message
    news:Oq02%...
    >I have created a Insert Query in Sql Data Source using Oracle Database,
    >with
    > the parameters, and its connected with DetailView Control.
    >
    > When I try to Insert through DetailView Control, Illegal Variable
    > Name/Number Error occurs.
    >
    > Is there any way I can trace or display on screen, what exactly the query
    > is
    > being passed to the Oracle with the Values.
    >
    > For example: If my Sql datasource has following query.
    >
    > Insert into mytable(invoice_no,inv_date,item_no,qty)
    > values:)invoice_no,:inv_date,:item_no,:qty)
    >
    > I need the query with the parameter values as under:-
    >
    > Insert into mytable(invoice_no,inv_date,item_no,qty)
    > values(1241,'23-jun-2006',12,1200)
    >
    > How can I trace and display the above query with the parameter values ?
    >
    > I am using VS 2005.
    >
    > Best Regards,
    >
    > Luqman
    >
    >
    >
    >
    >
    >
    Eliyahu Goldin, Jul 10, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rukmal Fernando
    Replies:
    4
    Views:
    837
    Richard Grimes [MVP]
    Oct 27, 2003
  2. Matthias S.
    Replies:
    1
    Views:
    634
    Daniel Fisher\(lennybacon\)
    Nov 30, 2005
  3. Anonymous
    Replies:
    0
    Views:
    1,440
    Anonymous
    Oct 13, 2005
  4. Harry Zoroc
    Replies:
    1
    Views:
    916
    Gregory Vaughan
    Jul 12, 2004
  5. Jiho Han
    Replies:
    0
    Views:
    499
    Jiho Han
    Aug 22, 2006
Loading...

Share This Page