Tuesday, March 18, 2014

How to create Laptop to wifi without any software?

How to create Laptop to wifi without any software?

.
Open Command prompt from Administrator
.
type :
.
netsh wlan show drivers
.
Press Enter
.
Type:
.
netsh wlan set hostednetwork mode=allow ssid=wifitest key=1234567890
.
*//Note:You can change of use another SSID name where i used SSID=wifitest and KEY is for Your WIFI password where i used KEY=1234567890
.
Type:
.
netsh wlan start hostednetwork
.
Your wifi has beed started now.
*//IF you have any problem then comment please and share this idea with you friends Thanks.

Wednesday, February 26, 2014

Connect without a DSN (using a connection string)

Connect without a DSN (using a connection string)

Let see a sample script to see how ADODB is used in PHP:

<?php
$myServer = "localhost";
$myUser = "your_name";
$myPass = "your_password";
$myDB = "examples";

//create an instance of the  ADO connection object$conn = new COM ("ADODB.Connection")
  or die("Cannot start ADO");

//define connection string, specify database driver$connStr = "PROVIDER=SQLOLEDB;SERVER=".$myServer.";UID=".$myUser.";PWD=".$myPass.";DATABASE=".$myDB;
  $conn->open($connStr); //Open the connection to the database

//declare the SQL statement that will query the database
$query = "SELECT * FROM cars";

//execute the SQL statement and return records
$rs = $conn->execute($query);

$num_columns = $rs->Fields->Count();
echo $num_columns . "<br>"; 

for ($i=0; $i < $num_columns; $i++) {
    $fld[$i] = $rs->Fields($i);
}

echo "<table>";

while (!$rs->EOF)  //carry on looping through while there are records
{
    echo "<tr>";
    for ($i=0; $i < $num_columns; $i++) {
        echo "<td>" . $fld[$i]->value . "</td>";
    }
    echo "</tr>";
    $rs->MoveNext(); //move on to the next record
}


echo "</table>";

//close the connection and recordset objects freeing up resources
$rs->Close();
$conn->Close();

$rs = null;
$conn = null;
?>