public OdbcCommand cmd;
public OdbcConnection con;
public String sqlstr;
protected void Page_Load(object sender, EventArgs e)
{
String sqlstring;
sqlstring = "Driver={SQL SERVER};Server=localhost;Database=mydata;UID=sa;PWD=1234;";
con = new OdbcConnection(sqlstring);
con.Open();<<<บันทัดนี้ครับ
if (!Page.IsPostBack) {
databind();
}
}
ERROR [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
ERROR [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).