Jump to content
Xtreme .Net Talk

Wutime

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Wutime

  1. Thanks for the detailed message - it was VERY helpful I'm going to give it a whirl
  2. I could do that, but that's not what I want. With 15 parameters it would be a waste of time if there is a property/method in the Command that would do this for me. I have a feeling this will be an invaluable peice of knowledge for me as I often use stored procedures.
  3. I would love to be able to do that, the problem is that I don't know where the string is... I'm simply supplying the name of the Procedure with this line.. Dim myCommand As SqlCommand = new SqlCommand("sp_player_vitals", myConnection) and then naming the parameters like this.... Dim parameterPlayerID As SqlParameter = New SqlParameter("@player_id", SqlDbType.Int, 4) ... I'm assuming this all gets put together by ASP.NET and then sent to the database....how do I get the completed, put together SQL statement? I'm assuming it's a property of myCommand... myCommand.ExecuteNonQuery()
  4. Essentially, I would like to see what "string" has been passed when this ExecuteNonQuery() takes place. myCommand.ExecuteNonQuery()
  5. Hehe, I'm definitely not using the right terminalogy. Part of the problem of being a newbie is lacking the basic knowledge to ask questions properly; I'll try again. My paramaters are being passed to my stored procedure (@Value, @Value), and the command text has been told the stored procedure name (sp_blah_blah). I wanted to see the completed t-sql string that is being sent to the SQL Server. For instance... t-sql command = " sp_blah_blah '124312', 'asldgj' " There must be a way to capture the command being sent to the database.... My stored procedure is executing without any reported errors. However, when I check the database, no updates or inserts have been made; therefor I'm curious to see what values are being sent so that I can try to debug from the database end of things. Cheers for your help, it's much appreciated.
  6. How do I view the "parsed" command text for a stored procedure before it gets sent to the database? I have a page updating a database using a stored procedure and passed arguments... ***************************************** Dim myConnection As New SqlConnection(ConnectionString) Dim myCommand As SqlCommand = new SqlCommand("sp_update_account", myConnection) myCommand.Connection = myConnection ' Mark the Command as a SPROC myCommand.CommandType = CommandType.StoredProcedure ' setup all stored procedure parameters from text field values ......removed for brevity myConnection.Open() myCommand.ExecuteNonQuery() ***************************************** I want to view the parsed myCommand.CommandText before it reaches the database. When I view the CommandText I only get "sp_update_account", I want to see teh exact command being passed to the SQL Server Database. My procedure isn't updating the database and I'm not recieving an error, so I need to view the exact SQL text being passed. Is this possible?
×
×
  • Create New...