Home > Archive > FoxPro database connector > April 2005 > How to pass a variable to a trigger by odbc









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to pass a variable to a trigger by odbc
Florian Hofmann

2005-04-07, 8:05 pm

Hi,
I am not so familiar with VFP. I have an VFP-Database, which use a
variable (MyVariable) in a trigger. I want to set a value for this
MyVariable in the SQL-Statement (e.g. used from MS-Querry).

So i am looking for a sql-expression like:

DECLARE MyVariable int
Set MyVariable = 123

update MyTable Set Nickname="Donald" where Surname="Duck"

But... unfortunately, it does not work...

How can i pass this value to the trigger using ODBC and MS Querry?

Thanks in advance,

Florian

fl. hofmannREMOVEREMOVE@
web.de
Anders Altberg

2005-04-07, 8:05 pm

VFPODBC has not been updated since VFP6 and it never allowed calling general
stored procedures or passing parameters to the triggered database procedures
it does support.
Since VFP7 Mixcrosoft distributes VFPOLEDB with VFP. VFPOLEDB allows you
you to call any stored procedure, with parameters if you like.
The help for VFPODBC is called DRVVFP.HLP and should bge found somewhere in
the Windows system folders.
The help for VFPOLEDB is integrated with the Help file and partially in the
MSDN Library.
-Anders

"Florian Hofmann" <No@spam.de> wrote in message
news:4245E50F.F8413C4E@spam.de...
> Hi,
> I am not so familiar with VFP. I have an VFP-Database, which use a
> variable (MyVariable) in a trigger. I want to set a value for this
> MyVariable in the SQL-Statement (e.g. used from MS-Querry).
>
> So i am looking for a sql-expression like:
>
> DECLARE MyVariable int
> Set MyVariable = 123
>
> update MyTable Set Nickname="Donald" where Surname="Duck"
>
> But... unfortunately, it does not work...
>
> How can i pass this value to the trigger using ODBC and MS Querry?
>
> Thanks in advance,
>
> Florian
>
> fl. hofmannREMOVEREMOVE@
web.de


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com