මචංලා මට C # වලට MYSql සම්භන්ද කරලා හදපු පොඩි Project File එකක් හරි, Connect කරන හැටි හරි කියල දෙන්න බැරිද....?
හදිස්සියි මචංලා....... Please
හදිස්සියි මචංලා....... Please
http://www.planet-source-code.com/
Me site eka ona tharam source code thiyanav. Mama nam C# danna naha. VB.NET dannee!!!
Dream in Code පැත්තෙ සංචාරයක් දාල බැලුවේ නැත්තෙ ඇයි ?
http://www.dreamincode.net/code/snippet1677.htm
Mcn u must download and install the mysql .NET connector first then try the following
Then Add a referance to MySQL
then use the following code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MySql.Data;
using MySql.Data.MySqlClient;
using MySql.Data.Types;
namespace CExample
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnConnect_Click(object sender, EventArgs e)
{
string MyConString = "SERVER=localhost;" +
"DATABASE=mydatabase;" +
"UID=testuser;" +
"PASSWORD=testpassword;";
MySqlConnection connection = new MySqlConnection(MyConString);
MySqlCommand command = connection.CreateCommand();
connection.Close();
}
}
}
Project File
downlad & installll mysql connecter/NEt & google for connection codin