Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jijo Pappachan
  Where is Jijo Pappachan?
 Kerala
 India
 Jijo Pappachan
 To: dan delpuerto
  
 
 
 dan delpuerto
 Tags
Subject: RE: addproperty
Thread ID: 344838 Message ID: 345006 # Views: 35 # Ratings: 0
Version: Visual FoxPro 6 Category: Classes and Objects
Date: Thursday, May 17, 2012 8:20:40 AM         
   


> Thanks.
> I am developing a sort of a DBF class/driver that can create more than 255 columns and more than 255-char field width (but still less than 2GB data and cannot be SQLed) - w/c I have successfully tested. However, I need to clear the created fields of the instance of the class/driver to open another file.
> Example:
> o = createobject("DbfClassDriver")
> o.Use("file1")
> o.Use("file2") - now consists of file1 and file2 fieldnames
>
> Or else I have to create a dedicated instance for file2

Create a seperate collection class for Fields. So that you can clear and reload your fields.

loDbfAccounts = CreateObject("DbfClassDriver")
*-- I would suggest give an option to pass dbf name while creating the object instead of another USE method. Like

loDbfAccounts = CreateObject("DbfClassDriver", "Accounts.dbf")
loDbfAccounts.NewRecord()
loDbfAccounts.Fields("acc_id").value = 1233
loDbfAccounts.Fields("acc_name").value = "MyAccount"

loDbfAccounts.Fields.FindValue(123)
?loDbfAccounts.Fiels(1).value &&Acc_id
?loDbfAccounts.Fiels(2).value &&Acc_name



Jijo
JUST THINK, THERE IS A WAY
my blog:http://weblogs.foxite.com/jijo_pappachan/

ENTIRE THREAD

addproperty Posted by dan delpuerto @ 5/14/2012 5:14:06 PM
RE: addproperty Posted by Borislav Borissov @ 5/14/2012 5:15:43 PM
RE: addproperty Posted by dan delpuerto @ 5/14/2012 5:28:49 PM
RE: addproperty Posted by Borislav Borissov @ 5/14/2012 6:14:12 PM
RE: addproperty Posted by dan delpuerto @ 5/14/2012 6:22:39 PM
RE: addproperty Posted by Pete Sass @ 5/14/2012 6:29:38 PM
RE: addproperty Posted by dan delpuerto @ 5/14/2012 6:38:42 PM
RE: addproperty Posted by Pete Sass @ 5/14/2012 10:57:26 PM
RE: addproperty Posted by dan delpuerto @ 5/15/2012 3:34:54 AM
RE: addproperty Posted by Tamar Granor @ 5/14/2012 10:47:36 PM
RE: addproperty Posted by Gordon King @ 5/15/2012 1:02:58 AM
RE: addproperty Posted by dan delpuerto @ 5/15/2012 3:51:44 AM
RE: addproperty Posted by Gordon King @ 5/15/2012 4:07:17 AM
RE: addproperty Posted by Jijo Pappachan @ 5/17/2012 8:20:40 AM
RE: addproperty Posted by dan delpuerto @ 5/17/2012 3:07:26 PM
RE: addproperty Posted by onytoo @ 5/18/2012 9:32:00 PM
RE: addproperty Posted by dan delpuerto @ 5/19/2012 9:26:11 AM