Coding
Visual Studio - Disable PDB generation in release mode
by Geoff on Oct.18, 2011, under c#, Coding
Simple as the title reads, this is often overlooked.
PDB files contain the following:
- Public, private, and static function addresses
- Global variable names and addresses
- Parameter and local variable names and offsets where to find them on the stack
- Type data consisting of class, structure, and data definitions
- Frame Pointer Omission (FPO) data, which is the key to native stack walking on x86
- Source file names and their lines
If you are working collaboratively with your client, this data is very useful. If you aren't, this could give someone the keys to the castle when you do not obfuscate your code.
In Visual Studio 2005, Project Properties > Compile Tab > Advanced Compile Options > Goto Generate Debug Info (dropdown list) and select None
In Visual Studio 2008, Project Properties > Build Tab > Advanced > Output - Debug Info > none
Keep Coding!
MyVolt.com - Data Buttons Ghosted?
by Geoff on Sep.27, 2011, under Coding
I infrequently go to the myvolt.com site in order to review some of the data that the Volt is collecting.
This morning I go over to the site to check the data and I get this ..
The data I actually used in a previous post is now "Coming Soon".
What's up GM?
A follow up to - Did I use that column before?
by Geoff on Sep.09, 2011, under Coding, SQL
This query will get you all of the tables, columns and column details for a database. You will need to substitute the column name with the name of the column that you are looking for.
SELECT table_name=sysobjects.name,
column_name=syscolumns.name,
datatype=systypes.name,
length=syscolumns.length
FROM sysobjects
JOIN syscolumns ON sysobjects.id = syscolumns.id
JOIN systypes ON syscolumns.xtype=systypes.xtype
WHERE sysobjects.xtype='U'
AND syscolumns.name like '%column name%'
ORDER BY sysobjects.name,syscolumns.colid
Ok, who locked the database?
by Geoff on Sep.09, 2011, under Coding, SQL
I work with six other developers. We don't have a SQL DBA per se. This means that sometimes my colleagues or even myself will have open SPIDs preventing a SQL RESTORE.
So, who locked the database?
select spid, status, loginame, hostname, blocked, db_name(dbid), cmd, * from master..sysprocesses where db_name(dbid) = 'database name'
MyGeneration - Code Generation and OR Mapping
by Geoff on Sep.07, 2011, under c#, Coding, SQL
I have adopted this tool at work for its code generation ability. It generated C# and SQL Stored Procedures that I needed for my latest update to our company software. It just works. Nothing fancy. No bells. No marketing. It just works.
You can download yours here.
Thanks!
