Archive for June, 2007

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
VN:F [1.1.6_502]Rating: 0.0/5 (0 votes cast)

Leave a Comment

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
VN:F [1.1.6_502]Rating: [...]

Leave a Comment

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.
VN:F [1.1.6_502]Rating: 0.0/5 (0 votes cast)

Leave a Comment

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:

VN:F [1.1.6_502]Rating: 0.0/5 (0 votes cast)

Leave a Comment

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/
VN:F [1.1.6_502]Rating: 0.0/5 (0 votes cast)

Leave a Comment

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 [...]

Leave a Comment

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(”SoftwareMicrosoftWindowsCurrentVersionUninstall”,RegistryKeyPermissionCheck::ReadSubTree,System::Security::AccessControl::RegistryRights::FullControl);
array^ rksubkeynames = rkprograms->GetSubKeyNames();
for (int i=0;iLength;i++) {
Object ^app = rkprograms->OpenSubKey(rksubkeynames[i])->GetValue(”DisplayName”);
if (app) {
listBox1->Items->Add(app);
}
}
VN:F [1.1.6_502]Rating: 0.0/5 (0 votes cast)

Leave a Comment

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(@”SoftwareMicrosoftWindowsCurrentVersionUninstall”);
foreach (string s in rkprograms.GetSubKeyNames())
[...]

Leave a Comment

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.)
VN:F [1.1.6_502]Rating: 0.0/5 (0 votes cast)

Leave a Comment

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 [...]

Leave a Comment