giday all,<br>
<br>
Hope someone may have they answer to this one. I have a form where the user enters a customer number then hits a print button. behind the print button it changes commandText property's sql statement to retrieve that customer's personal details - all is fine the first time entered.<br>
<br>
here is the SQL line of code:<br>
DataEnvironment1.Commands("cmdSinglePilot"
.CommandText = "SELECT TCustomer.*, " & "custNo AS No FROM TCustomer WHERE (custNo = " & txtInfo & "
<br>
<br>
txtInfo is the number entered by the user!<br>
<br>
However, unless the program is stopped then re-run, when enetering a new customer number, even though the sql statement is updated (have definately checked), the old customers details always show up. <br>
<br>
I have tried using the update function for both the dataEnvironment object and the command object which has the SQL statement attached to it, but no luck.<br>
<br>
It is as if the SQL statement has been changed but never executed therefore the same report details contine to be shown no matter what customer number is entered!<br>
<br>
Look forward to hear from someone who has either had the same problem or found a solution.<br>
<br>
Thanks<br>
<br>
<br>
Brendan (Australia)
<br>
Hope someone may have they answer to this one. I have a form where the user enters a customer number then hits a print button. behind the print button it changes commandText property's sql statement to retrieve that customer's personal details - all is fine the first time entered.<br>
<br>
here is the SQL line of code:<br>
DataEnvironment1.Commands("cmdSinglePilot"
<br>
txtInfo is the number entered by the user!<br>
<br>
However, unless the program is stopped then re-run, when enetering a new customer number, even though the sql statement is updated (have definately checked), the old customers details always show up. <br>
<br>
I have tried using the update function for both the dataEnvironment object and the command object which has the SQL statement attached to it, but no luck.<br>
<br>
It is as if the SQL statement has been changed but never executed therefore the same report details contine to be shown no matter what customer number is entered!<br>
<br>
Look forward to hear from someone who has either had the same problem or found a solution.<br>
<br>
Thanks<br>
<br>
<br>
Brendan (Australia)