Article View: borland.public.vdbase.forms
Article #140Re: VdB7 - REPLACE in a form
From: Frank Loomer
Date: Sat, 27 Mar 1999 00:00
Date: Sat, 27 Mar 1999 00:00
177 lines
9105 bytes
9105 bytes
--------------6BCF800535142C798946B5DF Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Tried to send this to Gene directly, but email wouldn't take. Hi Gene, I'm just beginning with Db7 and trying to orient myself to it. My background is Db4 with just a little bit of DB5.5 Can't find published educational material either. Thinking of your Replace question, instead of the old Use mydata.dbf approach, I have been trying to learn right off how to use the SQL based Query object, from which is derived the Rowset object, which contains a fields array type object which identifies all the fields identified in the rowset(default * gives you all fields in table) There is a value property you can use to change the value of a field in your table. I'm trying the Object-oriented approach for the sake of learning where the whole Db7 thing seems to want to go. I wanted to (1) add a new record, and (2) have the current date automatically entered into a Curr_Date field, which might be done by the old Replace command if you were using the traditional DML approach. This worked: form.query1.rowset.fields["Curr_Date"].value = Dtoc(Date()) Look in your Entryfield object inspector, and check for its value property. Same sort of thing should apply. I really do like the Grid, from what I've discovered so far, but its all be trial by error, since the DB7 documentation I have leaves a lot to be desired. I did learn a lot from reading through the reference material in Db5 esp the programmer's manual etc. & actually found the examples helpful (mostly)m but like yourself I'm looking for a basic text. What bothers me is that DB7 released over a year ago and there's nothing around yet as far as I know. That doesn't sound good to me. I wonder where Db7 stands in the scheme of things. 1-In the Query object theres the SQL statement eg Select * from "mytable.dbf" Active = true Once Active = true a rowset object is created automatically. You never see it in the code, but its a property of the Query object. Its the access to your table. 2. To set up the Grid you have to -Create a datalink eg form.Grid1.datalink = form.Query1.rowset I'd have to check the syntatical details on this, which I've got at home, but that should give an idea. - Then use the Columns property to select and organize the fields you're interested in. A dialogue box pops up that's easy to use. Theres also a columnsheader property for changing headers titles To experiment, try the Forms wizard first; then print the code & check it out. My present frustration is that Db7 keeps crashing while I'm working in the form designer instread for reasons that don't seem obvious. I'm taking notes for the time being. It seems that program errors in particular sometinmes seem to destabilize the Db7 platform instead of just putting out warnings abt program errors. I've reinstalled once, but maybe I should try again. Anyway, I've got to go. Hope this is helpful. === ======== Gene Horr wrote: > I have just started delving into VdB7 after many years of using > DOS based dBase(s). I have read the manuals and have read through > two books on VdB5, both of which were useless as.............. for > my applications. The help system I find even worse. They all go > into extreme detail on very basic items but all seem lacking on > anything beyond the basics. > > I've seen references to a Help/FAQ site, but unfortunately it is > blocked until next month. > > Well, enough b*tching... > > My fist question is: are there any other on-line references for > basic questions? For example one problem that I am pulling what > little of my hair I have out is how does one do the equivelent > of [REPLACE] to a field within a form? > > Secondly, I have had no luck searching for VdB7 books and from reading > the posts apparently there are none. Can anyone recommend a decent > book tutorial that goes beyond "this is a form, this is a database"? > > Thanks for your time. > > Gene Horr > genehorr@swbell.net --------------6BCF800535142C798946B5DF Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> Tried to send this to Gene directly, but email wouldn't take. <BR>Hi Gene, I'm just beginning with Db7 and trying to orient myself to it. My background is Db4 with just a little bit of DB5.5 Can't find published educational material either. Thinking of your Replace question, instead of the old Use mydata.dbf approach, I have been trying to learn right off how to use the SQL based Query object, from which is derived the Rowset object, which contains a fields array type object which identifies all the fields identified in the rowset(default * gives you all fields in table) There is a value property you can use to change the value of a field in your table. I'm trying the Object-oriented approach for the sake of learning where the whole Db7 thing seems to want to go. <BR>I wanted to (1) add a new record, and (2) have the current date automatically entered into a Curr_Date field, which might be done by the old Replace command if you were using the traditional DML approach. <BR>This worked: <BR>form.query1.rowset.fields["Curr_Date"].value = Dtoc(Date()) <BR>Look in your Entryfield object inspector, and check for its value property. Same sort of thing should apply. <BR>I really do like the Grid, from what I've discovered so far, but its all be <B>trial</B> by error, since the DB7 documentation I have leaves a lot to be desired. I did learn a lot from reading through the reference material in Db5 esp the programmer's manual etc. & actually found the examples helpful (mostly)m but like yourself I'm looking for a basic text. What bothers me is that DB7 released over a year ago and there's nothing around yet as far as I know. That doesn't sound good to me. I wonder where Db7 stands in the scheme of things. <BR>1-In the Query object theres <BR> the SQL statement eg Select * from "mytable.dbf" <BR> Active = true <BR> Once Active = true a rowset object is created automatically. You never see it in the code, but its a property of the Query object. Its <I>the </I>access to your table. <BR>2. To set up the Grid you have to <BR> -Create a datalink <BR>eg form.Grid1.datalink = form.Query1.rowset <BR>I'd have to check the syntatical details on this, which I've got at home, but that should give an idea. <BR>- Then use the Columns property to select and organize the fields you're interested in. A dialogue box pops up that's easy to use. Theres also a columnsheader property for changing headers titles <BR>To experiment, try the Forms wizard first; then print the code & check it out. <BR>My present frustration is that Db7 keeps crashing while I'm working in the form designer instread for reasons that don't seem obvious. I'm taking notes for the time being. It seems that program errors in particular sometinmes seem to destabilize the Db7 platform instead of just putting out warnings abt program errors. I've reinstalled once, but maybe I should try again. <BR>Anyway, I've got to go. Hope this is helpful. <P>=== <BR> <BR> <BR> <P>======== <P>Gene Horr wrote: <BLOCKQUOTE TYPE=CITE>I have just started delving into VdB7 after many years of using <BR>DOS based dBase(s). I have read the manuals and have read through <BR>two books on VdB5, both of which were useless as.............. for <BR>my applications. The help system I find even worse. They all go <BR>into extreme detail on very basic items but all seem lacking on <BR>anything beyond the basics. <P>I've seen references to a Help/FAQ site, but unfortunately it is <BR>blocked until next month. <P>Well, enough b*tching... <P>My fist question is: are there any other on-line references for <BR>basic questions? For example one problem that I am pulling what <BR>little of my hair I have out is how does one do the equivelent <BR>of [REPLACE] to a field within a form? <P>Secondly, I have had no luck searching for VdB7 books and from reading <BR>the posts apparently there are none. Can anyone recommend a decent <BR>book tutorial that goes beyond "this is a form, this is a database"? <P>Thanks for your time. <P>Gene Horr <BR>genehorr@swbell.net</BLOCKQUOTE> </HTML> --------------6BCF800535142C798946B5DF--
Technical Details
Message-ID:
<36FD14C5.44C4069B@nbccsj.gov.nb.ca>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36D6E6FD.77ADD157@swbell.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 15bdfb,72bf7cf61f22c3ab X-Google-Attributes: gid15bdfb,public From: Frank Loomer <loomerf@nbccsj.gov.nb.ca> Subject: Re: VdB7 - REPLACE in a form Date: 1999/03/27 Message-ID: <36FD14C5.44C4069B@nbccsj.gov.nb.ca> X-Deja-AN: 459748449 References: <36D6E6FD.77ADD157@swbell.net> Content-Type: multipart/alternative; boundary="------------6BCF800535142C798946B5DF" Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.vdbase.forms