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";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top