NinethSense oWnZ mE!: Praveen’s drawing book

Choose a Topic:

Thu
28
Jun '07

MSSQL: Query to display objects in a database #2

Simplified with CASE statement:
SELECT name,
CASE ( TYPE ) 
WHEN ‘P’ THEN ‘Stored Procedure’
WHEN ‘TR’ THEN ‘Trigger’
WHEN ‘V’ THEN ‘View’
WHEN ‘U’ THEN ‘Table’
WHEN ‘FN’ THEN ‘Function’
WHEN ‘F’ THEN ‘Foregin Key’
WHEN ‘K’ THEN ‘Key’
END AS ObjectType
FROM sysObjects
WHERE type IN (‘P’,‘TR’,‘V’,‘U’,‘FN’,‘F’,‘K’)
ORDER BY type,
name
'

MSSQL: Query to display objects in a database

This t-sql query will list names of sql objects and its type:


SELECT
	name,
	CASE WHEN type=‘P’ THEN 
		‘Stored Procedure’
	ELSE
		CASE WHEN type=‘TR’ THEN 
			‘Trigger’ 
			ELSE CASE WHEN type=‘V’ THEN
				‘View’
				ELSE CASE WHEN type=‘U’ THEN
				‘Table’
					ELSE CASE WHEN type=‘FN’ THEN
						‘Function’
						ELSE CASE WHEN type=‘F’ THEN
						‘Foregin Key’
							ELSE CASE WHEN type=‘K’ THEN
							‘Key’
							END
						END
					END
				END
			END
		END
	END
FROM 
	sysObjects 
WHERE 
	type=‘P’ OR type=‘TR’ OR type=‘V’ OR type=‘U’ OR type=‘FN’ OR type=‘F’ OR type=‘K’ 
ORDER BY
	type, name
Tue
26
Jun '07

MCTS Certification

I opened one MCTS topic at T-MUG forums.

http://forum.t-mug.org/topic.asp?TOPIC_ID=1312


Ask there if you have some doubts. Also try posting the resources.
Mon
25
Jun '07

T-Mug Session @ NEST Campus

We (T-MUG) conducted one session on Database Mirroring on SQL Server 2005 at NeST Cyber Campus, Trivandrum. Amit Bansal was the speaker and it was a success.

More than 20 people attend. Here are some photos:

Fri
22
Jun '07

PIT Solutions 7th Anniversary - 22 June 2007

We are celebrating the anniversary of PIT Solutions Pvt. Ltd., the company I presenly work for.





Company website: http://www.pitsolutions.com/
Wed
20
Jun '07

Microsoft SQL Server 2008 CTP is out!




Your Data, Any Place, Any Time

SQL Server 2008, the next release of Microsoft SQL Server, provides a comprehensive data platform that is more secure, reliable, manageable and scalable for your mission critical applications, while enabling developers to create new applications that can store and consume any type of data on any device, and enabling all your users to make informed decisions with relevant insights.


Check this for more details: http://www.microsoft.com/sql/prodinfo/futureversion/default.mspx
'

Get list of installed softwares with Managed C++

The below code is for listing installed softwares in a windows machine with Managed C++.


 RegistryKey^ rk = RegistryKey::OpenRemoteBaseKey(RegistryHive::LocalMachine, System::Environment::MachineName);
				 RegistryKey^ rkprograms = rk->OpenSubKey(“Software\Microsoft\Windows\CurrentVersion\Uninstall”,RegistryKeyPermissionCheck::ReadSubTree,System::Security::AccessControl::RegistryRights::FullControl);
 
					 array<string ^,1>^ rksubkeynames = rkprograms->GetSubKeyNames();
				 for (int i=0;i<rksubkeynames ->Length;i++) {
					 Object ^app = rkprograms->OpenSubKey(rksubkeynames[i])->GetValue(“DisplayName”);
					 if (app) {
						listBox1->Items->Add(app);
					 }
				 }</rksubkeynames></string>
Tue
19
Jun '07

Programatically get list of Installed Programs

To get the list of installed software programs in a machine use this code:


 RegistryKey rk = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, “pvn”);
            RegistryKey rkprograms = rk.OpenSubKey(@“Software\Microsoft\Windows\CurrentVersion\Uninstall”);
            foreach (string s in rkprograms.GetSubKeyNames())
            {
                listBox1.Items.Add(s);
            }



Namespace: Microsoft.Win32
Tue
12
Jun '07

css: Multiple class in same element.

If you want to specify two style class’ in same element, put it like this:

class=“class1 class2″


(Another traditional way is put style tag also and put all the code in class there.)
Fri
8
Jun '07

Disable back button

After the first test phase, it is always the problem for developers to handle browser ‘back button’ disaster. There are so many ways to handle this. But the way you select depends on the nature of your ‘probelm’.

Well, this method I liked much.
<script language=“javascript”>
      history.go(1);
</script>



Put this in the of your page. This will allow the page to load only ‘forward’ and virtually disables the ‘backword’
The CodeProject Microsoft Developer Network Official ASP.NET Forums Microsoft .NET Framework Community Microsoft Most Valuable Professional Kidoos forums Microsoft Visual Studio Developer Home Professional Information Technology Solutions Microsoft Research Home Trivandrum Microsoft Users Group Community Website