
November 14th, 2005, 05:41 PM
|
|
Registered User
|
|
Join Date: Nov 2005
Posts: 3
Time spent in forums: 25 m 53 sec
Reputation Power: 0
|
|
|
Syntax error in FROM clause. in c#.NET
Hi i'm trying to get access database fields but when i'm running appears the message:Syntax error in FROM clause.
Here is some of my code:
if(chbEditora.Checked)
{
String strpath=Server.MapPath("bibli.mdb");
String myConnectionstr="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + strpath;
String strsql="Select * from Livros where"+ "Livros.editora=" + " '"+txbEditL.Text+"' ";
myConnection=new System.Data.OleDb.OleDbConnection(myConnectionstr) ;
myConnection.Open();
cmd=new OleDbCommand(strsql,myConnection);
OleDbDataReader DtReader = cmd.ExecuteReader();
dtgResult.DataSource = DtReader;
dtgResult.DataBind();
DtReader.Close();
}
If you please help me, I really need help quickly.
Thanks!!
|