Popular Articles

At one time Russia rivaled the USA as a global power, but then came Gorbochov and we all know that Russia broke up into 18 states. This was also the end
From the 8th century the Muslim invaders began to make forays into Hindustan and by the 12th century the entire North India and the throne at Delhi had
Privacy is an important thing in every section. Same goes for mobile phones too. People always have something to hide from others on their mobile phone

Latest Articles

Subhas Chandra Bose was a rival of Gandhi and during the war he threw his lot with the Fascist powers and joined them. He had a one point agenda to overthrow
At one time Russia rivaled the USA as a global power, but then came Gorbochov and we all know that Russia broke up into 18 states. This was also the end
I had in an earlier post pointed out that the great Hindu warrior  Hemu was struck by an arrow in his eye in the third battle of Panipat and lost

Connection in mysql with java

com.mysql.jdbc.Driver mysql Driver name and conn is a connection string

Example Code

Class.forName(“com.mysql.jdbc.Driver”);

url=”jdbc:mysql://localhost/clients”;

conn=DriverManager.getConnection(url,”root”,”pass”);

System.out.println(“opened Mysql”);

Connection in Ms Access with java

First create dsn name in control panel

ControlpanelàAdminToolàDataSource

“sun.jdbc.odbc.JdbcOdbcDrive “is a driver name and conn is a connection string

Example Code

Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);

url=”jdbc:odbc:dsnname”;

conn=DriverManager.getConnection(url,”user”,”pass”);

System.out.println(“opened Ms Access”);

Connection in MS SQL SERVER with java

sun.jdbc.odbc.JdbcOdbcDrive Driver name and conn is a connection string

Example Code

Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);

url=”jdbc:odbc:dsnname”;

conn=DriverManager.getConnection(url,”user”,”pass”);

System.out.println(“opened MS SQL SERVER”);

Connection in mysql with PHP

Here Host is localhost ,red is a username and blue is a password

Example Code

$connection = mysql_connect("host","red","blue");

mysql_select_db("databasename", $connection);

Connection in Ms Access with PHP

First create dsn name in control panel

ControlpanelàAdminToolàDataSource

$conn=odbc_connect('localhost','username','password');

Connection in MS SQL SERVER with PHP

Establishes a connection to a

Syntax

mssql_connect([string servername[, string username [, string password]]])

Example Code

$connection = mssql_connect("host","red","blue");

mssql_select_db("databasename", $connection);

Connection with DSN Name In PHP

$conn = odbc_connect('myDSNname','','');

 

 

  • No comments found