Tengo un problema de sintaxis, creo que el caracter \
no me deja conectar con Access.
¿Qué puede estar pasando?
class dataclass
{
public string conec = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C: \ Users\heribertol\Desktop\Pocket\Pocket.accdb;";
OleDbConnection cn = new OleDbConnection();
public void open()
{
cn.Open();
}
public void close()
{
cn.Close();
}
public DataTable tabla()
{
DataTable dt = new DataTable();
OleDbDataAdapter da = new OleDbDataAdapter();
DataSet ds = new DataSet();
da.SelectCommand = new OleDbCommand("select * FROM Sheet1 ", cn);
da.Fill(ds);
dt = ds.Tables[0];
return dt;
}
}