Wednesday, November 30, 2011

Connection C# and SQL Server 2005

Programming in C# .NET in ms visual studio net 2003 used SQL server 2005 connection :
1) Create database hwsw in sql server 2005 with table inventory and field is : idinventory, nameinventory, transaction inventory. etc
2) Create Form in C# net and drag datagrid in toolbox, with source code below:
             string connectionString = "Data Source=172.16.10.14;Initial Catalog=hwsw;Integrated   Security=False; User id=xxx;Password=xxxx";
            string sql = "SELECT * FROM inventory";
            SqlConnection connection = new SqlConnection(connectionString);
            connection.Open();           
            sCommand = new SqlCommand(sql, connection);
            sAdapter = new SqlDataAdapter(sCommand);
            sBuilder = new SqlCommandBuilder(sAdapter);
            sDs = new DataSet();
            sAdapter.Fill(sDs, "inventory");
            sTable = sDs.Tables["inventory"];
            connection.Close();
            dataGrid1.DataSource = sDs.Tables["inventory"];
            dataGrid1.ReadOnly = true;
            save_btn.Enabled = false;

Thursday, November 24, 2011

Send email automatic with blat

Every day we can check connection server by email, and .log file server can be send my email automatically. See below command prompt we used basic. Step by step used blat send email :

1. Download program blat in http://www.blat.net
2. copy to drive c: in folder blat
3. Create script and save blat.bat
del c:\ReportServer\log_RPing\ping_%date:~7,2%%date:~4,2%%date:~10,10%.log
echo "---------------STATUS SERVER----------------" >> c:\ReportServer\log_RPing\ping_%date:~7,2%%date:~4,2%%date:~10,10%.log
ping -n 1 172.16.10.1 >nul &&(echo Router is ON>> c:\ReportServer\log_RPing\ping_%date:~7,2%%date:~4,2%%date:~10,10%.log )||( echo Router is -------OFF>> c:\ReportServer\log_RPing\ping_%date:~7,2%%date:~4,2%%date:~10,10%.log )
c:\ReportServer\blat.exe c:\ReportServer\log_RPing\ping_%date:~7,2%%date:~4,2%%date:~10,10%.log -t mnasrul@gmail.com -s "Report Daily Server Ping %date:~7,2%%date:~4,2%%date:~10,10%" -f h20026@ddssz.com -server mail.duduuuu.com


4. Create schedule in windows
5. See email send by blat report my server status :


--STATUS SERVER--: Router is ON & DB-SVR is ON

Tuesday, November 22, 2011

Virtual Box (virtual pc)

Virtual Box is a virtual machine for used pc installation, management, configuration, such as operating system windows xp, linux etc. with virtual box we can make problem and handling data error with customer presentation.
Using virtual any operating system to analyst and learning about information technology implementation program, after we make program coding for Axapta and implement for windows server or windows 7 and debug. For analyst viruses windows can implement to and change theme. See picture left them.

a great brother

a great brother!

Sunday, November 20, 2011

Setting Email Gmail in MS Outlook 2007

Friends! email from gmail.com have to configure with POP3 in Outlook Email and you don't every login if you access gmail account in yours computer. This step by step to configure access email with pop3 - outlook setting :

1. login account in gmail --> Setting --> Porwarding and POP/IMAP --> enable pop for all mail --> Save Changes

2. Open MS Outlook 2007 --> Add New MAil Account --> Manually Configure Settings or additional server Types [checklist]-->next -->add in account email and password,

your name : mnasrul
email address : mnasrul@gmail.com
account type : pop3
incoming mail server : pop.gmail.com
Outgoing mail server : ......list in internet service provider (ISP), examp : smtp.telkom.net
user name : mnasrul
password : ***********

--> more setting -->advanced --> this server requires an encrypted connection (SSL) [centang] ...995 not 110 --> ok

Congratulation!!! your finish setting gmail account in MS outlook 2007

Remote Desktop Connection

Local Remote Computer is a way to access two or more different computers through the medium of computer networks, if we want to access a computer with different conditions place on the computer B, then this can be done by step:

1) Connect two computers / UTP cable more with media

2) Setting IP to each computer (eg: computer A and computer B)

3) Setting Remote Access on computer A

4) Accessing computer A on computer B
IP address
              PC A : 192.168.1.5
  PC B : 192.168.1.6

 allow remote from computer A, see picture :

right click --> my computer -->Remote--> check “Allow users to connect remotely to this computer” --> ok.

remote computer B to computer A :
Start --> Run [mstsc]


next input : 192.168.1.5
Klik Connect