Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Problem in Delphi

Status
Not open for further replies.

PaidtheUmpire

Programmer
Jan 4, 2004
105
AU
I have suddenly got a problem in a SQL query using an ADO connection from Delphi7 to Access...

here is the code...

//CODE START
With SimCardCRNQuery do begin
Close;
SQL.clear;
SQL.Add('SELECT Client_Reference_Number, SimCardPlan ');
SQL.Add('FROM SimCard_Details ');
SQL.Add('WHERE IMSI_Number = VALUE AND Current_Owner = Yes;');
SimCardCRNQuery.Parameters.ParamByName('VALUE').Value := IMSI;
Open;
try
First;
CRN := Fields[0].asString;
SCP := Fields[1].asString;
showmessage(SCP);
finally
Close;
end;
end;
//CODE END

All fields are there... so any ideas????
 
small change in bold

SQL.clear;
SQL.Add('SELECT Client_Reference_Number, SimCardPlan ');
SQL.Add('FROM SimCard_Details ');
SQL.Add('WHERE IMSI_Number = :VALUE AND Current_Owner = Yes;');
SimCardCRNQuery.Parameters.ParamByName('VALUE').Value := IMSI;

cheers,


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top