VFP 8 Cursor Adapter 
Author Message
 VFP 8 Cursor Adapter

I am trying to create a cursor adapter based on a SQL 2000 table, when I use
the builder it informs me that the schema can not exceed 255 chanraters (the
table has some long and supposedly helpful field names).

Does this mean that I am going to have to pare down my sql tables so that
VFP can cope ?

I am sure that the old remote views would have worked but I really want to
use CA's



Mon, 29 Aug 2005 18:09:44 GMT  
 VFP 8 Cursor Adapter
Hello, Adam!
You wrote  on Thu, 13 Mar 2003 10:09:44 -0000:

 AW> Does this mean that I am going to have to pare down my sql tables so
 AW> that VFP can cope ?

 AW> I am sure that the old remote views would have worked but I really want
 AW> to use CA's

I haven't looked at the CA's in detail yet, so I don't have an answer to
your question, but maybe you like Mark McCasland's CA Classlib builder. For
more details, locate his thread in this newsgroup:
"Final CursorAdapter VCX Builder Released", 03/07/2003.

http://www.mctweedle.com/downloads/CABuilder.zip
---
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Mon, 29 Aug 2005 18:20:05 GMT  
 VFP 8 Cursor Adapter
Hello,

this limitation is due to the 255 character limit of properties in vcx
classes

you can overcome this with:

1. define your Cursoradapter in a prg ..

or if you want to use VCX based classes ..

2. don't use the builder and set the CursorSchema in the Init Event of the
CA

Function Init
    THIS.CursorSchema = " some very long Cursorschema ...... " + ;
                                        " ........... "
Endfunc

Regards

Christian



Quote:
> I am trying to create a cursor adapter based on a SQL 2000 table, when I
use
> the builder it informs me that the schema can not exceed 255 chanraters
(the
> table has some long and supposedly helpful field names).

> Does this mean that I am going to have to pare down my sql tables so that
> VFP can cope ?

> I am sure that the old remote views would have worked but I really want to
> use CA's



Mon, 29 Aug 2005 18:40:11 GMT  
 VFP 8 Cursor Adapter
That's a bit of a downer really. I want to be able to set the control
sources on my forms visually. This 255 limit is a bit of a pain.


Quote:
> Hello,

> this limitation is due to the 255 character limit of properties in vcx
> classes

> you can overcome this with:

> 1. define your Cursoradapter in a prg ..

> or if you want to use VCX based classes ..

> 2. don't use the builder and set the CursorSchema in the Init Event of the
> CA

> Function Init
>     THIS.CursorSchema = " some very long Cursorschema ...... " + ;
>                                         " ........... "
> Endfunc

> Regards

> Christian



> > I am trying to create a cursor adapter based on a SQL 2000 table, when I
> use
> > the builder it informs me that the schema can not exceed 255 chanraters
> (the
> > table has some long and supposedly helpful field names).

> > Does this mean that I am going to have to pare down my sql tables so
that
> > VFP can cope ?

> > I am sure that the old remote views would have worked but I really want
to
> > use CA's



Mon, 29 Aug 2005 18:57:12 GMT  
 VFP 8 Cursor Adapter
Having decided to go down the editing the init route, do you know what
property I need to set for cursor adapters which is the equivalent of
NODATAONLOAD when using remote views - this is so I can use filtered
selects.


Mon, 29 Aug 2005 20:04:00 GMT  
 VFP 8 Cursor Adapter
Sorry to keep pestering you but...

Given that I am dropping this on a dataenvironment and not instantiating it
in code, how do I control this?

If forced to I suppose I could just instantiate it in code.


Quote:
> Hello,

> there's is no property ..
> instead you have to call the 'CursorFill' Method with parameters - the
> second parameter tell's the CA if he should create the cursor with data or
> without

> Regards

> Christian



> > Having decided to go down the editing the init route, do you know what
> > property I need to set for cursor adapters which is the equivalent of
> > NODATAONLOAD when using remote views - this is so I can use filtered
> > selects.



Mon, 29 Aug 2005 22:04:04 GMT  
 VFP 8 Cursor Adapter
I am now adding CA's to the data environment at run-time, but I am missing
something when it comes to filtered queries. If I add where x=?filter_value
the CA refuses to work and I get an alias does not exist error - without the
filter.

LOCAL loDE as DataEnvironment, loCA as CursorAdapter

ftsk_id=5 &&The filter value

loDE = thisform.dataenvironment
loDE.Addobject('task_filtered_cursor','task_filtered_ca')

loCA=loDE.task_filtered_cursor
loCA.CursorFill()

SELECT task_filtered
BROWSE


Quote:
> Sorry to keep pestering you but...

> Given that I am dropping this on a dataenvironment and not instantiating
it
> in code, how do I control this?

> If forced to I suppose I could just instantiate it in code.



> > Hello,

> > there's is no property ..
> > instead you have to call the 'CursorFill' Method with parameters - the
> > second parameter tell's the CA if he should create the cursor with data
or
> > without

> > Regards

> > Christian



> > > Having decided to go down the editing the init route, do you know what
> > > property I need to set for cursor adapters which is the equivalent of
> > > NODATAONLOAD when using remote views - this is so I can use filtered
> > > selects.



Tue, 30 Aug 2005 00:36:44 GMT  
 VFP 8 Cursor Adapter
When I set the value of ftsk_id and use aerror() to see what went wrong, the
message is "Microsoft OLE DB Provider For SQL Server : No Value Given For
One Or More Required Parameters" - this is despite the fact that I am
setting the value immediately before calling cursorfill


Quote:
> Hello,

> you don't have to create the CA's at runtime
> just set AutoOpenTables property of DataEnvironment to .F.
> then you could open the CA's in the init by calling each CursorFill method
> with the appropiate parameters

> your code should work if your select statement looks like

> SELECT * FROM yourTable WHERE searchColumn = ?ftsk_id

> if the CursorFill method returns .F. something went wrong, check AERROR()
> then for more details

> Regards

> Christian



> > I am now adding CA's to the data environment at run-time, but I am
missing
> > something when it comes to filtered queries. If I add where
> x=?filter_value
> > the CA refuses to work and I get an alias does not exist error - without
> the
> > filter.

> > LOCAL loDE as DataEnvironment, loCA as CursorAdapter

> > ftsk_id=5 &&The filter value

> > loDE = thisform.dataenvironment
> > loDE.Addobject('task_filtered_cursor','task_filtered_ca')

> > loCA=loDE.task_filtered_cursor
> > loCA.CursorFill()

> > SELECT task_filtered
> > BROWSE



> > > Sorry to keep pestering you but...

> > > Given that I am dropping this on a dataenvironment and not
instantiating
> > it
> > > in code, how do I control this?

> > > If forced to I suppose I could just instantiate it in code.



> > > > Hello,

> > > > there's is no property ..
> > > > instead you have to call the 'CursorFill' Method with parameters -
the
> > > > second parameter tell's the CA if he should create the cursor with
> data
> > or
> > > > without

> > > > Regards

> > > > Christian



> > > > > Having decided to go down the editing the init route, do you know
> what
> > > > > property I need to set for cursor adapters which is the equivalent
> of
> > > > > NODATAONLOAD when using remote views - this is so I can use
filtered
> > > > > selects.



Tue, 30 Aug 2005 17:26:49 GMT  
 VFP 8 Cursor Adapter
Ok,

Let's say that I manually set the control sources of each
and every control.

How can I issue a TableUpdate() automatically?

Am I supposed to add more code to do it?

If so, why don't we just issue sqlexec commands all over
the program?

Viva FoxPro!

Thanks,
Denys

Quote:
>-----Original Message-----
>That's a bit of a downer really. I want to be able to
set the control
>sources on my forms visually. This 255 limit is a bit of
a pain.


in message

>> Hello,

>> this limitation is due to the 255 character limit of
properties in vcx
>> classes

>> you can overcome this with:

>> 1. define your Cursoradapter in a prg ..

>> or if you want to use VCX based classes ..

>> 2. don't use the builder and set the CursorSchema in

the Init Event of the
Quote:
>> CA

>> Function Init
>>     THIS.CursorSchema = " some very long

Cursorschema ...... " + ;
Quote:
>>                                         " ........... "
>> Endfunc

>> Regards

>> Christian


Newsbeitrag

>> > I am trying to create a cursor adapter based on a

SQL 2000 table, when I
Quote:
>> use
>> > the builder it informs me that the schema can not

exceed 255 chanraters
Quote:
>> (the
>> > table has some long and supposedly helpful field
names).

>> > Does this mean that I am going to have to pare down
my sql tables so
>that
>> > VFP can cope ?

>> > I am sure that the old remote views would have

worked but I really want

- Show quoted text -

Quote:
>to
>> > use CA's

>.



Mon, 03 Oct 2005 06:46:50 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. VFP 8 Cursor Adapters

2. VFP8: Cursor Adapter - yet another problem

3. Cursor Adapter

4. LAN Adapter Number in VFP 6.0

5. Dialup-Adapter in VFP

6. VFP 8.0 - Adapter Class

7. Network Adapters App

8. Network Adapters App

9. Display Adapters

10. Adapter Class Not Updating Data On Server Side

11. Automatic update does not work in a subclassed cursor adapter?

12. How to send cursors to vfp client from vfp automation server

 

 
Powered by phpBB® Forum Software