Subject Re: [IBO] Odd TIB_Cursor problem in 4.8.7
Author tickerboo2002
My apolgies for flooding the list with these posts. The last example
I sent includes a mix of pCur and IB_Cursor1, I'd assembled the
example from previous posts and my current code. The actual code
using all IB_Cursor declarations exhibits the behaviour I described.


--- In IBObjects@yahoogroups.com, "tickerboo2002" <egroup@...> wrote:
>
> > How does it fail? Exception? (If so, what?) or empty set? (The
> latter would happen with an IB_Cursor if you called Open instead of
> First....)
>
> Either I've lost the plot and cannot see the obvious, or I've got a
> duff build or something. The code below works if I index into the
> columns. It returns the correct column if I use FindParam, but
> ParamByName fails to return a column:
>
> pCur->SQL->Text = "Select USER_ID from USERS where
> USER_NAME=:USER_NAME and PW=:PW";
>
> pCur->Prepare();
> //pCur->Params->Columns[0]->AsString = sUser; // Works
>
> TIB_Column * pCol = IB_Cursor1->FindParam( "USER_NAME");
> if ( pCol )
> {
> ShowMessage("found"); // It finds the column
> }
>
> pCur->ParamByName("USER_NAME")->AsString = sUser; // Fails
>
>
> This is using BCb2006 and IBOv4.8.7. Am i missing something obvious
here?
>