On Apr 15, 2006, at 9:40 AM, Jan Erik Moström wrote:
I don't know if I'm blind or ...
I'm using REALSQLDatabase and I want to have a "pre-compiled"
question where
I enter the search strings. Something like this
preCompQuestion = myDB.precompile( "select a,b,c where d = ? and e
= ?" )
result = preCompQuestion( "first string", "second string" )
But I can't figure out how to do it.
What I really want to do is to avoid to build the search question but
concatenating strings (to avoid security/syntax problems), should I
do it
some other way?
Some databases do not support this
But you can do something like :
dim myPrecmpiledSQL as string = "select a,b,c where d = :1 and e
= :2"
dim sql as string
sql = myPrcompiledSQL
sql = replaceAll(sql,":1", parameter1)
sql = replaceAll(sql,"2", parameter2)
execute sql
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>