Backend SQL Commands in BO


Author
Message
Ross L. Rooker, Sr.
Ross L. Rooker, Sr.
StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)
Group: Forum Members
Posts: 153, Visits: 462
I know that this command in the programs file will show you the actual command sent to the backend: MicroFour.StrataFrame.Data.DataBasics.DataSources[0].SetDebugOn("C:\\ValetLog.html", true);

What command would I insert in my base bo to get this command when SAVE is clicked. That would get me the INSERTs and UPDATEs. Then what command would I use to get the DELETE. Lastly what method in the BO would these commands be placed. 

 
Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Let me see if I understand, you are wanting to capture the actual SQL command that is executed along with the parms, etc. when Save is executed on the BO, correct?  If this is the case, then you will want to override the ExecuteNonQuery method in your base BO and it will give you the command that will be executed:


''' <summary>
''' Overrides the ExecuteNonQuery() method of the base class.
''' </summary>
Protected Overrides Function ExecuteNonQuery(ByVal CommandToExecute As System.Data.Common.DbCommand) As Integer
    '-- You can use the CommandToExecute to pull out everything you need at this point.  For example, CommandToExecute.CommandText will
    '    give you the command text and then you can look at the .Parameters collection to get all of the parms.

    '-- Perform the standard logic
    Return MyBase.ExecuteNonQuery(CommandToExecute)
End Function

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search