Hi. I have the following code:
DataEnvironment1.Connection1 = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=agenda_templ"
DataEnvironment1.Commands.Item(1).CommandType = adCmdTable
DataEnvironment1.Commands.Item(1).CommandText = "select * from Agenda_angajati where cod_ang= '" & Text2.Text & "' "
DataEnvironment1.Command1

When the program tries to execute
DataEnvironment1.Command1
I get this error:
"Syntax error in FROM clause!"
But I do not understand what is wrong. Could someone help me please? Thank you!