Subject | Re: [IBO] Odd TIB_Cursor problem in 4.8.7 |
---|---|
Author | Helen Borrie |
Post date | 2008-07-06T10:36:40Z |
At 04:33 AM 5/07/2008, you wrote:
Helen
>I've recently upgraded to 4.8.7 and come across an odd problem that IHow 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....)
>cannot figure out:
>
>Using BCB2006, I create a TIB_Cursor
>
> 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
> pCur->Params->Columns[1]->AsString = sPW;
>
> pCur->ParamByName("USER_NAME")->AsString = sUser; // Fails
> pCur->ParamByName("PW")->AsString = sPW;
>Usually I always use ParamByName, but pCur->ParamByName("PW") isYes, quite a lot has changed. But nothing that would break old code, unless it was already suspect. Let's know first exactly what the failure is..
>failing to return a column. If I look through the params columns it
>lists USER_NAME and PW. Using an index into the columns works fine.
>
>What could be causing this, has something changed in recent versions
>of IBO (was using 4.6 until recently)
Helen