I regularly export table data from MySQL using PHP, however a question on StackOverflow.com came up where the user wanted to export data from MS SQL rather than MySQL.Handily, PHP has support for many of the same functions for MS SQL as it does for MySQL. So with a bit of reworking I was able [...]
I recently answered a question on StackOverflow.com by a user who needed to retrieve a list of a given users Privileges for each Table in a given Database.After some trial an error I ended up with the following T-SQL Script; declare @Proc nvarchar(50)declare @RowCnt intdeclare @MaxRows intdeclare @ExecSql nvarchar(255) select @RowCnt = 1select @Proc = 'SELECT [...]
In order to retrieve the highest value of a column in a list of collection, Linq offers a handy method to achieve this; Dim maxUnitsInStock = Aggregate prod In db.Products _ Into Max(prod.UnitsInStock)Simple!
If you ever need to retrieve data from EF using the name of a column, rather than the built in Intellisense, then the following vb.net code snippet may help. GetType(TypeOfEntity).GetProperty(NameOfColumn).GetValue(ActualEntity, Nothing)TypeOfEntity is the name of the Entity from which you wish to retrieve data. NameOfColumn is obviously the Name of the Column from which you [...]
While creating Desktop Applications using WPF, I always employ the MVVM model if I can. This model is not only great at developing testable n-tier applications, but of course is also highly recommended by Microsoft. However, as with most software development, there are nearly always specific methods to employ for certain processes and functions. One [...]