what's the meaning of preparing a sql statement?
what's it's use?

--
.~. Might, Courage, Vision. In Linux We Trust.
/ v \ http://www.linux-sxs.org
/( _ )\ Linux 2.4.22-xfs
^ ^ 5:02pm up 13 days, 17:34, 0 users, load average: 0.99, 0.97, 0.91

Re: sqlprepare() by Stefan

Stefan
Thu Feb 05 03:51:22 CST 2004

There is a good example in the related help topic,
do you have it available?

* They say this is quicker:
tcCustomer = 'Smith'
? SQLPREPARE(h, 'SELECT * FROM customers WHERE companyname = ?tcCustomer')
? SQLEXEC(h)
tcCustomer = 'Jones'
? SQLEXEC(h)

* this is slower
? SQLEXEC(h, [SELECT * FROM customers WHERE companyname = 'Smith'])
? SQLEXEC(h, [SELECT * FROM customers WHERE companyname = 'Jones'])


hth
-Stefan

"toylet" <toylet@mail.hongkong.com> schrieb im Newsbeitrag
news:e$kW0b86DHA.3420@TK2MSFTNGP11.phx.gbl...
>
> what's the meaning of preparing a sql statement?
> what's it's use?
>
> --
> .~. Might, Courage, Vision. In Linux We Trust.
> / v \ http://www.linux-sxs.org
> /( _ )\ Linux 2.4.22-xfs
> ^ ^ 5:02pm up 13 days, 17:34, 0 users, load average: 0.99, 0.97,
0.91


Re: sqlprepare() by toylet

toylet
Thu Feb 05 05:59:50 CST 2004

hmm.. is the performance gain significant? I wonder whether the function
is used by application developer.

Stefan Wuebbe wrote:

> There is a good example in the related help topic,
> do you have it available?
>
> * They say this is quicker:
> tcCustomer = 'Smith'
> ? SQLPREPARE(h, 'SELECT * FROM customers WHERE companyname = ?tcCustomer')
> ? SQLEXEC(h)

--
.~. Might, Courage, Vision. In Linux We Trust.
/ v \ http://www.linux-sxs.org
/( _ )\ Linux 2.4.22-xfs
^ ^ 7:58pm up 13 days, 20:30, 1 user, load average: 0.99, 0.97, 0.91