Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor limits
Message
De
30/01/2006 09:29:27
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
30/01/2006 07:16:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01091366
Message ID:
01091439
Vues:
13
>Hi,
>
>I have created a cursor to act as a control source for a grid I have on a form. I want to use this as a temp location for data entry before committing it to the database. Seems to work ok.
>
>Only problem is on a form where I have 2 grids. As soon as I create the second cursor, the first one vanishes.
>
>Would cursors be the best method of achieving this? And if so.. how do I get around my first cursor disappearing?
>
>
>Cheers
>John

N cursor and N grids might coexist on a form. ie:
Public oForm
oForm = Createobject('myForm')
oForm.Show

Define Class myForm As Form
 DataSession = 2
 Height = 400
 Width=200
 Add Object grd1 As Grid With Top=0,Left=0,Height=100,Width=200,RecordSource='crs1'
 Add Object grd2 As Grid With Top=110,Left=0,Height=100,Width=200,RecordSource='crs2'
 Add Object grd3 As Grid With Top=220,Left=0,Height=100,Width=200,RecordSource='crs3'

 Procedure Load
  Create Cursor crs1 (f1 i,f2 c(10))
  Create Cursor crs2 (f1 i,f2 c(10))
  Create Cursor crs3 (f1 i,f2 c(10))
  For ix=1 To 10
   Insert Into crs1 Values (m.ix,'crs1_'+Transform(m.ix))
   Insert Into crs2 Values (m.ix,'crs2_'+Transform(m.ix))
   Insert Into crs3 Values (m.ix,'crs3_'+Transform(m.ix))
  Endfor
  Go 1 In 'crs1'
  Go 1 In 'crs2'
  Go 1 In 'crs3'
 Endproc
Enddefine
Cursor creation implicitly selects a new workarea. If cursor 1 is disappearing then you're doing something explicitly to make it happen.

While this is a way for data entry you might directly use base tables with buffering and/or views, cursoradapters.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform