I'm in C# language and still learning about Model View Control. Now I have project for my school to make a cashier application, but I have this error when I'm trying to connect mysql database.
The error is :
An unhandled exception of type 'System.ArgumentException' occurred in System.Data.dll
Additional information: Keyword not supported: 'port'.
this is my codes :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
using System.Data;
namespace AppKasir.KoneksiDB
{
class KoneksiBarang
{
public static SqlConnection getKoneksiBarang()
{
string strCon = "SERVER = localhost; PORT = 3306; UID = root; PWD = ; Database = db_kasirmysql;";
return new SqlConnection(strCon);
}
}
}
The error is at line:
return new SqlConnection(strCon);
Which the symbol ;
is underline red.