Re: VFP 6.0 using SQL stored procedures by Thierry
Thierry
Tue Mar 22 13:30:15 CST 2005
Sorry, when I try to use parameters, this seem to be a problem with VFP6.
OK with VFP8/9.
You should use SqlExec() instead of view.
--
Thierry
"KcK" <no@spam.com> a écrit dans le message de news:
h9Z%d.12601$hu3.3777@twister.rdc-kc.rr.com...
> Thierry:
>
> I get an error when I try and run, it says it's invalid and I think its
> failing on the EXECUTE piece. Is this compatible with VFP6?
>
> - Ben
>
> "KcK" <no@spam.com> wrote in message
> news:KXY%d.12600$hu3.6585@twister.rdc-kc.rr.com...
>> Great! I'll give it a go and thanks!
>>
>> - Ben
>>
>>
>> "Thierry" <tper_NOSPAM@vfemail.net> wrote in message
>> news:OuGcGNwLFHA.1176@TK2MSFTNGP15.phx.gbl...
>> >
>> > CREATE SQL VIEW vEmp CONNECTION MyConn ;
>> > as EXECUTE yourStoredProcedure ?dDate
>> >
>> >
>> > --
>> > Thierry
>> >
>> >
>> > "KcK" <no@spam.com> a écrit dans le message de news:
>> > qYX%d.12428$gx3.9924@tornado.rdc-kc.rr.com...
>> > >I have a stored procedure in a SQL DB that accepts two parameters.
> Have
>> > > used remote views to access SQL tables but never called a stored
>> > > procedure. Tried using the VFP remote view wizard to access and the
>> stored
>> > > procedure isn't listed.
>> > >
>> > > What is the syntax to access a SQL stored procedure through remote
> view?
>> > > Or, if that's the wrong way how to I access the stored procedure
> another
>> > > way? Not talking about a VFP stored procedure, its on the SQL side.
>> > >
>> > > My code currently looks something like (stripped it down for
> brievity):
>> > >
>> > > ** Create connection
>> > > Create CONNECTION MyConn;
>> > > DATASOURCE alltrim(config.sourceodbcn);
>> > > USERID alltrim(config.sourceodbcu);
>> > > PASSWORD alltrim(config.sourceodbcp)
>> > >
>> > > ** Create view
>> > > Create SQL VIEW 'vEmp' ;
>> > > REMOTE CONNECTION 'MyConn' ;
>> > > as SELECT *;
>> > > FROM EMPLOYEES EMPLOYEES;
>> > > WHERE Employees.HireDate = ?dDate
>> > >
>> > > ** Use the view
>> > > dDate=ctod('02/05/2005')
>> > > Use vEmp IN 0
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> >
>> >
>>
>>
>
>