RAKESH HEMRAJANI <[email protected]> wrote:
> for example:
>
> an user defined function is intended to get the rowcount of the input table.
>
> user can type the below command
>
> select rowcount('employee') from sqlite_master;
What's the role of sqlite_master in this query? Accepting, for the sake of
argument, that it's useful to encapsulate row count in a user-defined function,
why isn't the query simply
select rowcount('employee');
> actual code:
> it fails since m unable to get call back reference from context variable
What is this "callback reference" you speak of? Why can't you provide your own
callback (if for some reason you insist on using sqlite3_exec), or use
sqlite3_prepare / sqlite3_step interface?
> and bcoz of that application terminates while printing
> the value to the o/p interface (user screen)
Why does a custom function need to print anything? It just needs to calculate
its result, and report it using one of sqlite3_result_* functions.
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users