How to use string variable in Select Statement where Expression?

How can i use a string variable in Select statement in the fallowin code ?

static void Job3(Args _args)
{
dialog dlg;
DialogGroup dlgGroup;
DialogField dlgField;
str S;
// int A;
CustTable custTable;
;
dlg = new dialog();
dlgGroup=dlg.addGroup(“Customer”);
dlgField=dlg.addField(Typeid(CustAccount),“Account Number”);

if(dlg.run())
{
S=dlgField.value();
}
// A =str2int(s);
select custTable where custTable.AccountNum ==S;

print "This is the address of Customer " + custTable.AccountNum + ": " + custTable.Address;
pause;
}

Use the EDT from AccountNum field then you can do: AccountNum == varEDTAccountNum;

Hi,

i got the solution. in the above Code i didn’t mention the size of the string.

Now i did that (str 10 s;)

The problem solved