NinethSense oWnZ mE!: Praveen’s drawing book

Choose a Topic:

Tue
29
May '07

Microsof Access Database (MDB) from PHP

This code demonstrates how to access a Microsoft Access Database (MDB) from PHP. Here I used PHP 5 for testing.


 
< ?_php
 
/* This example shows how to open and do operations on a Microsoft Access Database using PHP odbc functions */
 
$db_connection = odbc_connect(“DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=E:\root\php\DataBase.mdb”, “ADODB.Connection”, “password”, “SQL_CUR_USE_ODBC”);
 
echo “<hr><b>Show all tables</b><br /><br />”;
$result = odbc_tables($db_connection);
 
while (odbc_fetch_row($result)) {
    if(odbc_result($result,“TABLE_TYPE”)==“TABLE”) {
        echo “<br />” . odbc_result($result,“TABLE_NAME”);
    }
} 
echo “<hr /><b>SELECT code, comment from Degree</b><br /><br />”;
 
$res = odbc_exec($db_connection,“SELECT *FROM Degree”);
 
 
 
 
 
$i = 0;
while (odbc_fetch_row($res)) {
	$arr = odbc_fetch_array($res,$i);
	echo “<br />” . $arr[“code”] . “, “. $arr[“comment”];
	$i++;
}
 
echo “<br /><br /><b>Number of rows = $i</b><br /><br />”;
 
odbc_close($db_connection);
?>
 
Mon
28
May '07

C program to draw a circle

One of my very old favorite program .. C/C++ Graphics with Borland Graphics Interface (BGI) library.


#include <graphics .h>
 
int main()
{
	int gd = DETECT, gm = DETECT; /* Auto detect graphic device and mode */
	initgraph(&gm, &gd, “”); /* Initialize graphics */
	circle(100,100,50); /* Draw Circle */
	return 0;
}</graphics>
Wed
23
May '07

Troubleshooting Performance Problems in SQL Server 2005

It is not uncommon to experience the occasional slow down of a SQL Server database. A poorly designed database or a system that is improperly configured for the workload are but several of many possible causes of this type of performance problem. Administrators need to proactively prevent or minimize problems and, when they occur, diagnose the cause and take corrective actions to fix the problem. This paper provides step-by-step guidelines for diagnosing and troubleshooting common performance problems by using publicly available tools such as SQL Server Profiler, System Monitor, and the new Dynamic Management Views in SQL Server 2005.


Here is the link: http://www.microsoft.com/technet/prodtechnol/sql/2005/tsprfprb.mspx
'

Use Threads and Build Asynchronous Handlers in Your Server-Side Web Code

Fortunately for developers, threading in ASP.NET is a lot easier than it was in ASP. In this article, the author takes a look at threading in the ASP.NET HTTP pipeline, and explains how threads are managed efficiently without the involvement of the developer. The article considers how the common language runtime threadpool is used by ASP.NET to service requests, looks at the pooling mechanisms used for handlers, modules, and applications, and covers both IIS 5.0 and IIS 6.0 and how they differ in their approach to request processing and thread allocation. Finally, how and when to use asynchronous handlers is discussed for developers who still need to use threads in their own applications.


Check this: http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/
Tue
22
May '07

Choosing the right programming language

My students used to ask me “which programming language is the best?” and “which programming language I must learn?”. But the truth is – one cannot give an accurate answer for this. If somebody answers to this question simply - like C++ or Java, I will say he is a frog living inside a well. He may be giving this answer from his experience and knowledge, which is very less.


Check my latest article at : http://ninethsense.com/content/view/51/55/
'

SQL Performance: Good Practices for Beginners

Most of the developers are like ‘accidental developers’ and they identify the database performance problems only when the client reports the issues. If you give importants to these guidelines, you can standardise the performance to a stable level. I wrote this article from my own experience and knowledge.


Check the article SQL Performance: Good Practices for Beginners at http://www.codeproject.com/useritems/SQLGoodPractices.asp
Thu
17
May '07

UTF7 Converter

I have one excel export module on a project which will output UTF7 encoded text. That is because the requirement included unicode characters (German, French etc.). I am able to test those files with Microsoft Excel XP, 2000 etc. But after I install Microsoft Office 2007, it stopped working. It was time consuming for me to go to the other developer’s machine and test. So I wrote a quick c# windows application to do the job. Since I have html data with tables, I used the webbrowser control to display the contents. Here is the code:

Stream inputstream = new FileStream(filename, FileMode.Open, FileAccess.Read);
 
                        byte[] bytes = new byte[inputstream.Length];
                        int outputlength = inputstream.Read(bytes, 0, int.Parse(inputstream.Length.ToString()));
 
                        char[] chars = Encoding.UTF7.GetChars(bytes, 0, outputlength);
 
                        string contents = new string(chars);
                        webBrowser1.DocumentText = contents;
Mon
14
May '07

New Article Published. - Imporants of Aim.

Today I posted my new project management article “Importants of Aim”. You can read about that at http://ninethsense.com/content/view/49/59/


In this article, I tried to motivate people who are lazy ;)


Hope you will give me feedbacks as usual. Also, this is my very first article which is non-technical.
'

What is the difference between “using x.y;” and “using z = x.y;”

using x.y; is just referencing a namespace while using z = x.y; defines an alias.

Eg:
using Microsoft.DirectX;
using DirectX = Microsoft.DirectX;
Fri
11
May '07

Difference between Windows Vista Editions

There are different Editions for Windows Vista:

  • Windows Vista Home Basic
  • Windows Vista Home Premium
  • Windows Vista Business
  • Windows Vista Enterprise
  • Windows Vista Ultimate



  • Home Basic and Home Premium are consumer-focused versions, with features like Family Safety (formerly known as Parental Controls), and Home Premium includes Media Center.

    Business and Enterprise are corporate-focused editions, with features like Domain join and Remote Desktop/Terminal Services.

    The Ultimate edition combines all features of both the consumer and corporate editions into one version.



    All editions come in both 32-bit (x86) and 64-bit (x64) editions, and users are free to use the same product identifier for both platforms.

    Source: DirectX FAQ
    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