>>>Hi Viv,
>>>
>>>It doesn't ring a bell for me. I'll look this weekened anyway.
>>
>>I can't remember the exact scenario but I remember posting code that would set a public variable for use by VFPOLEDB.....
>>Best,
>>Viv
>
>Hi Viv,
>
>I guess you meant this one
Re: Pass a web variable to a stored procedure Thread #
1257541 Message #
1258431Thanks Viv,
and
Thanks Naomi. Your memory and search ability is amazing. I truly do get embarrassed when an answer to a question turns up to be one of my previous threads. (This may actually be my 3rd go at this. In the prior case I learned how to solve the previous problem but not enough to carry it forward to my new situation. Let's review and see if it will work in the new environment. The assignment is to create an edit log that preserves date, user, old and new values, etc. The code to do this is in a stored procedure that executes via INSERT and UPDATE triggers. The reason it is by trigger is that the edits may happen any one of 3 ways, the VFP UI Browse, the VFP application, the web (.NET). So the SP looks like this
func SaveHistory()
lparam lcTriggerType
INSERT INTO historylog (editdate,user,etc) values (datetime(),gcUserName,etc)
and the triggers look like this:
SaveHistory("U")
SaveHistory("I")
This works fine from the VFP side. Now lets go to the NET side. We have an SqlDatasource using an OLEDB connection, and a Formview using the SqlDatasource. The user clicks the Formview into edit mode,makes the edits, and then clicks Save/Update which fires the SqlDataSource UpdateCommand. Assuming I can programmatically define the UpdateCommand, how can I embed the value of Session("User") so that the SP can see it?
Note that the SP is not fired from NET. It is fired inside VFP by the trigger.