Hi...

I've a table in SQL which having student informations like ( code, name, age, etc.

1. I want to get the information of the students which codes are mentioned in the variable "stringValue" ( using VFP 8.0
StringValue = "0001,0002,0003,0004,0005,0006,0007,0008,0009,0010

* ------------ * ------------ * ------------ * ------------ * ------------ * ------------ * ------------

2. How can I pass a VFP Cursor Records in SQL statement using SQLEXEC()

Thanks in advanc

Rav

Re: How to pass the string/VFP Cursoft values in SQL by MyFullBorisName

MyFullBorisName
Sun May 16 14:13:48 CDT 2004

On Sat, 15 May 2004 04:16:03 -0700, Ravi Mehrotra <Ravi Mehrotra> wrote:
1. You can concatenate the string to match Your request, smething like:
my_sql = "SELECT * FROM Students WHERE Code IN '"+stringValue+"'" && I
am not sure if IN is the right command
SQLEXEC(sqlHandler, my_sql, "MtCursor")

2. To pass a cursor records just add a ? before statements
SQLEXEC(sqlHandler, "SELECT * FROM Students WHERE Code IN ?(SELECT *
FROM VFPCursor)","MyCursor")




>
> Hi...!
>
> I've a table in SQL which having student informations like ( code, name,
> age, etc. )
>
> 1. I want to get the information of the students which codes are
> mentioned in the variable "stringValue" ( using VFP 8.0 )
> StringValue =
> "0001,0002,0003,0004,0005,0006,0007,0008,0009,0010"
>
> * ------------ * ------------ * ------------ *
> ------------ * ------------ * ------------ * ------------ *
>
> 2. How can I pass a VFP Cursor Records in SQL statement using
> SQLEXEC() ?
>
> Thanks in advance
>
> Ravi
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

Re: How to pass the string/VFP Cursoft values in SQL by Anders

Anders
Mon May 17 09:10:09 CDT 2004

How you really tesdted that? In VFP?
-Anders

"MyFullBorisName" <nomorespam@spam.com> wrote in message
news:opr73w1ayx72p4pu@host44.net113.int.lan...
> On Sat, 15 May 2004 04:16:03 -0700, Ravi Mehrotra <Ravi Mehrotra> wrote:
> 1. You can concatenate the string to match Your request, smething like:
> my_sql = "SELECT * FROM Students WHERE Code IN '"+stringValue+"'" && I
> am not sure if IN is the right command
> SQLEXEC(sqlHandler, my_sql, "MtCursor")
>
> 2. To pass a cursor records just add a ? before statements
> SQLEXEC(sqlHandler, "SELECT * FROM Students WHERE Code IN ?(SELECT *
> FROM VFPCursor)","MyCursor")
>
>
>
>
> >
> > Hi...!
> >
> > I've a table in SQL which having student informations like ( code, name,
> > age, etc. )
> >
> > 1. I want to get the information of the students which codes are
> > mentioned in the variable "stringValue" ( using VFP 8.0 )
> > StringValue =
> > "0001,0002,0003,0004,0005,0006,0007,0008,0009,0010"
> >
> > * ------------ * ------------ * ------------ *
> > ------------ * ------------ * ------------ * ------------ *
> >
> > 2. How can I pass a VFP Cursor Records in SQL statement using
> > SQLEXEC() ?
> >
> > Thanks in advance
> >
> > Ravi
> >
>
>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/


Re: How to pass the string/VFP Cursoft values in SQL by MyFullBorisName

MyFullBorisName
Wed May 19 16:58:15 CDT 2004

No unfortunately I didn't have a SQL server intalled on my home
machine.But I use a similar commands in my office. Try it. According to
some articles I read the code ater "?" is evaluated in front end before it
passed to the SQL Server.