Home > Archive > Clarion > October 2006 > Error GET() MSSQL
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| carlos@cymap.es 2006-10-19, 6:55 pm |
| I Work with Clarion 5 AND MS SQL Driver , when i try to use GET
Function, the driver translate the select
and put '?' in the value i find.
Example :
CLEAR( VER:RECORD )
VER:IDVERSION = 1
GET( Version, VERSION_PK1 )
The WHERE clausule in the select stament when I trace the driver is
".....WHERE IDVERSION = ?
Can you help me please ??
Thank you very Much
| |
| JonWat 2006-10-19, 6:55 pm |
| That's what it should like. The '?' is a bind variable. Without bind
variables your program would be sending text to the database, like:
Select x,y from taba where z = 1
Select x,y from taba where z = 2
Select x,y from taba where z = 3
Select x,y from taba where z = 4
and so on, to fill a browse.
Every time it got a query like that the database would have to parse it
and work out the quickest way to get you the data you asked for. Maybe
10 to 100 times the effort to do the parsing than to provide you with
the data.
So Clarion sensibly sends the query like
Select x,y from taba where z = :somevalue
then when the second query comes in the same, with only the bound value
different, no parsing and planning has to happen, that's already done.
It just has to get the data.
Doesn't do anything to explain any error you might get, but then you
didn't provide any information about that. The '?' is good, though.
Jon
carlos@cymap.es wrote:
> I Work with Clarion 5 AND MS SQL Driver , when i try to use GET
> Function, the driver translate the select
> and put '?' in the value i find.
>
> Example :
> CLEAR( VER:RECORD )
> VER:IDVERSION = 1
> GET( Version, VERSION_PK1 )
>
> The WHERE clausule in the select stament when I trace the driver is
> ".....WHERE IDVERSION = ?
>
>
> Can you help me please ??
>
> Thank you very Much
|
|
|
|
|