sc_sql_protect(Value, "Type", "Connection")

This macro will protect the value passed as a parameter according to the user database, the "Connection" parameter is optional, if not informed Scriptcase will use the default connection.

The "Type" parameter so far can only use the "Date" value.

 

Ex 01: In this example we will protect the dates passed as parameter so this way it can be correctly interpreted to the ACCESSED database.

sc_select_where(add) = " AND news_noticias.noticia_data_pub
BETWEEN ".sc_sql_protect($data_inicial, "date")." AND ".sc_sql_protect($data_final, "date")."";