Hi,

I am using VFPOLEDB ( Visual Foxpro OLEDB provider) to connect to
Visual Foxpro 8 using OLEDB interfaces in CPP .
Normal queries like
SELECT * FROM employees
SELECT * FROM employees where employeeid=?
SELECT employeeid,lastname FROM employees are working.
But if I wrote a query like

SELECT employeeid,lastname FROM employees where employeeid=?

Preparation using pICommandPrepare->Prepare(0) is suceeding. But
after that when I try to get the metadata of query using
pIColumnsRowset->GetColumnsRowset, it is failing. It throws
"Unspecified Error(E_FAIL)"
But the same metadata command is working for all the above three
working queries.
If we are not getting metadata of queries and execute directly after
prepare, it is working.
Does any one face such an issue with VFPOLEDB? Does it require any
additional setting of Properties.
I set DBPROP_INIT_OLEDBSERVICES=0

Regards
Zunil
Cordys

Re: VFPOLEDB with Visual Foxpro fails for Paramerized queries by Anders

Anders
Tue Oct 26 09:41:03 CDT 2004

VFP would expect a variable afte the ?
x = 123
SELECT * FROM employees where employeeid=?x
Or you have to set up Parameters object somewhere
-Anders


"Sunil" <zunilp@gmail.com> wrote in message
news:8e0c3fab.0410260122.3b6105fd@posting.google.com...
> Hi,
>
> I am using VFPOLEDB ( Visual Foxpro OLEDB provider) to connect to
> Visual Foxpro 8 using OLEDB interfaces in CPP .
> Normal queries like
> SELECT * FROM employees
> SELECT * FROM employees where employeeid=?
> SELECT employeeid,lastname FROM employees are working.
> But if I wrote a query like
>
> SELECT employeeid,lastname FROM employees where employeeid=?
>
> Preparation using pICommandPrepare->Prepare(0) is suceeding. But
> after that when I try to get the metadata of query using
> pIColumnsRowset->GetColumnsRowset, it is failing. It throws
> "Unspecified Error(E_FAIL)"
> But the same metadata command is working for all the above three
> working queries.
> If we are not getting metadata of queries and execute directly after
> prepare, it is working.
> Does any one face such an issue with VFPOLEDB? Does it require any
> additional setting of Properties.
> I set DBPROP_INIT_OLEDBSERVICES=0
>
> Regards
> Zunil
> Cordys


Re: VFPOLEDB with Visual Foxpro fails for Paramerized queries by zunilp

zunilp
Fri Oct 29 06:05:28 CDT 2004

hI, Can Any one help me in this?
Regards
Zunil
Cordys

zunilp@gmail.com (Sunil) wrote in message news:<8e0c3fab.0410260122.3b6105fd@posting.google.com>...
> Hi,
>
> I am using VFPOLEDB ( Visual Foxpro OLEDB provider) to connect to
> Visual Foxpro 8 using OLEDB interfaces in CPP .
> Normal queries like
> SELECT * FROM employees
> SELECT * FROM employees where employeeid=?
> SELECT employeeid,lastname FROM employees are working.
> But if I wrote a query like
>
> SELECT employeeid,lastname FROM employees where employeeid=?
>
> Preparation using pICommandPrepare->Prepare(0) is suceeding. But
> after that when I try to get the metadata of query using
> pIColumnsRowset->GetColumnsRowset, it is failing. It throws
> "Unspecified Error(E_FAIL)"
> But the same metadata command is working for all the above three
> working queries.
> If we are not getting metadata of queries and execute directly after
> prepare, it is working.
> Does any one face such an issue with VFPOLEDB? Does it require any
> additional setting of Properties.
> I set DBPROP_INIT_OLEDBSERVICES=0
>
> Regards
> Zunil
> Cordys

Re: VFPOLEDB with Visual Foxpro fails for Paramerized queries by Anders

Anders
Mon Nov 01 08:20:01 CST 2004

Hi Sunil
Check out http://www.mctweedle.com and got to FoxPro Tools.
-Anders


"Sunil" <zunilp@gmail.com> wrote in message
news:8e0c3fab.0410290305.6e56a9bf@posting.google.com...
> hI, Can Any one help me in this?
> Regards
> Zunil
> Cordys
>
> zunilp@gmail.com (Sunil) wrote in message
news:<8e0c3fab.0410260122.3b6105fd@posting.google.com>...
> > Hi,
> >
> > I am using VFPOLEDB ( Visual Foxpro OLEDB provider) to connect to
> > Visual Foxpro 8 using OLEDB interfaces in CPP .
> > Normal queries like
> > SELECT * FROM employees
> > SELECT * FROM employees where employeeid=?
> > SELECT employeeid,lastname FROM employees are working.
> > But if I wrote a query like
> >
> > SELECT employeeid,lastname FROM employees where employeeid=?
> >
> > Preparation using pICommandPrepare->Prepare(0) is suceeding. But
> > after that when I try to get the metadata of query using
> > pIColumnsRowset->GetColumnsRowset, it is failing. It throws
> > "Unspecified Error(E_FAIL)"
> > But the same metadata command is working for all the above three
> > working queries.
> > If we are not getting metadata of queries and execute directly after
> > prepare, it is working.
> > Does any one face such an issue with VFPOLEDB? Does it require any
> > additional setting of Properties.
> > I set DBPROP_INIT_OLEDBSERVICES=0
> >
> > Regards
> > Zunil
> > Cordys