Thursday, July 28, 2011
PHP and MS SQL Server connection in IIS 7
<?php
$connectionInfo = array("UID" => "sa", "PWD" => "asdf123*", "Database"=>"testdb");
$serverName = ".\SQLEXPRESS";
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn )
{
echo "Connection established...<br />";
}
else
{
echo "Connection could not be established.\n";
die( print_r( sqlsrv_errors(), true));
}
//Lets do some sample sql select.
// Send a select query to MSSQL
$stmt = sqlsrv_query($conn,'SELECT * FROM users');
if( $stmt === false)
{
echo "Error in query preparation/execution.\n";
die( print_r( sqlsrv_errors(), true));
}
// Check if there were any records
if (sqlsrv_has_rows($stmt)==false) {
echo 'No records found';
} else {
?>
<table width="100%" border="2px">
<?php while ($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) { ?>
<tr>
<td><?php echo $row['name']; ?></td>
<td><?php echo $row['designation']; ?></td>
</tr>
<?php } ?>
</table>
<br /> <?php
}
// Free the query result
sqlsrv_free_stmt($stmt);
/* Close the connection. */
sqlsrv_close($conn);
phpinfo();
?>
Sunday, July 17, 2011
windows in Ubuntu 11 as Virtual OS
Running windows in Ubuntu 11 as Virtual OS.
Running Visual Studio 2010 Express and SQL Server Express Edition 2008 R2 in virtual OS
Google Chrome, FileZilla, and Virtual Box in Ubuntu.
Thursday, July 14, 2011
Install VMware Player in Ubuntu
Using VMware Player you can run virtual os in ubuntu. You can get it from VMware website http://www.vmware.com/products/player/overview.html
Let the file name be sudo sh VMware-Player-3.1.4-385536.i386.bundle
Let the file name be sudo sh VMware-Player-3.1.4-385536.i386.bundle
- Copy the .bundle to a directory, say Desktop
- Open Terminal and goto Desktop (use command cd to change directory. more.. https://help.ubuntu.com/community/UsingTheTerminal)
- Type sudo sh VMware-Player-3.1.4-385536.i386.bundle
This will Extract the Installer.. You can now install using the VMware installer..
All the best!
Monday, July 11, 2011
Ubuntu 11 in Windows Server 2008 R2
Installing Ubuntu 11 in Windows Server 2008 R2 using Oracle VM VirtualBox
Hello.. i was installing Ubuntu in windows server 2008 R2 to testing remote desktop connection between Windows os and Linux os.. Also installing SQL Server 2008 R2.
Subscribe to:
Posts (Atom)