problems with join queries in ADO.NET

  • Thread starter Thread starter agassi
  • Start date Start date
A

agassi

hi guys,
i really need your help. Im stucked here with a problem with a join
query. can you tell me what is wrong with my code. by the way, i'm
using C++.NET:

String* Sql_Query_1 = "SELECT Value FROM ListConstant WHERE
ListConstant.Field_Num = Field.Field_Num";

Db_SqlCommand_1 = new
System::Data::OleDb::OleDbCommand(Sql_Query_1,Db_Connection2);

Db_DataReader_1 = Db_SqlCommand_1->ExecuteReader();

i got an OLEDBException!!
please help me!!
 
Hi
Looking at your query string don't you think you should have an inner join on ListConstant and Field tables??

"SELECT Value FROM ListConstant inner join Field on ListConstant.Field_Num = Field.Field_Num";
 
Back
Top