Imran Akram's blog

Let's talk about life, technicalities, career opportunities, current affairs and a lot more!

How to put a carriage return in with Find-Replace Dialog?

Today we had a funny situation, my friend generated some sql from his custom code and it needed to have a ‘Go’ statement in between,, because it had create procedure statements in it. So after a bit of googling, I found out that you can use Microsoft Word for it and use the ^p character [...]

  • Share/Bookmark

How to get the name and definition of all Stored Procedures in a Database?

Today I wanted to get the script of all the Stored procedures in a database. I used this query to do so. Pretty much self explanatory is this, isn’t it? Use [myDatabaseName] SELECT ROUTINE_NAME, ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_TYPE=’PROCEDURE’

  • Share/Bookmark

How to remove ReadOnly Attribute from a file?

Hello friends, Here’s a nice little piece of code you can use to change file attributes of a particular file, its particularly useful when you’re trying to delete a read only file. string savedCardFilePath = “My absolute file path”; if (File.Exists(savedCardFilePath)) { /* * Remove readonly attribute off of the file if it exists before [...]

  • Share/Bookmark

TinyMCE not working on IE 7

Happy new year folks,  09′ started off for me with a very strange bug. I was working on a form and decided to use TinyMCE in it for multi-line text editing and it was working A-OK in FF3, Chrome and Safari but not on IE 7. God that was a real pain in the butt [...]

  • Share/Bookmark