VB.NET
Private Sub Form1_Load(ByVal sender As Object, ByVal e AsSystem.EventArgs)
Dim connectionString As String = "Driver=MySQL}; SERVER=localhost; DATABASE=NorthwindMySQL;"
Dim conn As New OdbcConnection(connectionString)
conn.Open()
Dim da As New OdbcDataAdapter("", conn)
Dim ds As New DataSet("Cust")
da.Fill(ds, "TABLENAME")
dataGrid1.DataSource = ds.DefaultViewManager
conn.Close()
End Sub
JAVA
public static void main(String args[]) {
Connection con = null;
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql:///test","root", "secret");
if(!con.isClosed())
System.out.println("Successfully connected to MySQL server using TCP/IP...");
} catch(Exception e) {
System.err.println("Exception: " + e.getMessage())
} finally {
try {
if(con != null)
con.close();
} catch(SQLException e) {}
}
}
PHP
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'password';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'petstore';
mysql_select_db($dbname);
Opinion: Beyond ‘Leave No Trace’, mountaineers should help fight against
the larger threats to our mountains
-
SAN JOSE, DINAGAT ISLANDS – For decades, the Leave No Trace (LNT)
principles have served as guiding tenets for mountaineers.
The post Opinion: Beyond ‘Le...
3 weeks ago
baket walang c#? bias ka captain puroi..joke..hahahaha
ReplyDeletewahahaha nakalimutan ko Ehehehe.
ReplyDelete