On Fri, Jan 14, 2011 at 6:22 AM, Alan Bourke <[email protected]> wrote:
> I don't think this needs to be an SQL Server sproc, it needs to just be
> a VFP SQLEXEC() parameterised query. For example, assuming string fields
> and an existing connection :
>
> lcSQL = "select count(" + fieldname + ") as c from " + tablename + "
> where " + fieldname + "='" + value + "'"
>
> SqlExec(nHandle, lcSQL, "resultcursor", laCountInfo)
>
> >From there you can look at resultcursor or laCountInfo for the result.
>
> You might want to use SQL parameters for safety.
>
> If you want to go down the stored proc route look for "Using SQL Server
> Input/Output Parameters" in the VFP help which shows how
> to create an SP on the fly and return a value to VFP.
> --
------------------------

Could you receive a value of 0 instead of -N

then the above will work for you.  Otherwise we need to tweak the return.



-- 
Stephen Russell

Sr. Production Systems Programmer
CIMSgts

901.246-0159 cell

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to