update method in vb 3.0 vs vb 4.0

update method in vb 3.0 vs vb 4.0

Post by Paul Cho » Sat, 02 Dec 1995 04:00:00



i have a text field (txt1) bound to a data control (data1).  data1 is
bound to table "employers".  txt1 is tied to "company".  the database
is "abc.mdb".

in a command button called "save", i have the following in the click
event:

    data1.recordset.update

thus, when i run this small program, the table is positioned at the
first record.  hence i can use the vcr buttons of the data control and
move in either "direction" of the record sequence.

if modification is made to the the txt1 field, the changes are
committed when i move to another record via the validate event of
data1.

in vb3, i can click on the save button and the validate event will
called with update action parameter.

in vb4, i get an "3426" (an action was cancelled by an associated
object) error.  i called ms tech support and was told that the error
message should have been "3020" (update called without edit nor
addnew).

why?

the "visdata" sample program in vb3 uses the update method in the
click event of the "update" button.  ie:

    data1.recordset.update

in vb4, visdata has the following:

    data1.updaterecord      '!!!!

anyone has any ideas?

thanks.

--------
paul chow

 
 
 

update method in vb 3.0 vs vb 4.0

Post by Michael E. Hogber » Sat, 02 Dec 1995 04:00:00


Hi Paul;

        I am having similar problems using their own examples I get
Object dosent support method or property.  I have had my app in
operation with VB3.0 for a year and a half with no problems.  I have
spent six or seven hours on the phone with them and they have no
answer.  I suggest that the data object has a bug they do not want to
committ to that.  I sent them my database (because they dident have
one other than bibilo) still no answer.  If you get any answers
please let me know, and I will do the same.

                                        MEH
                                        Senior Technical Instructor
                                        Johnson Controls Training

 
 
 

update method in vb 3.0 vs vb 4.0

Post by J. Kyle Ricke » Sun, 03 Dec 1995 04:00:00



Quote:

>the "visdata" sample program in vb3 uses the update method in the
>click event of the "update" button.  ie:

>    data1.recordset.update

>in vb4, visdata has the following:

>    data1.updaterecord      '!!!!

>anyone has any ideas?

>thanks.

The database methods have been restructured as described in
Chapter 10, page 198 of the "Guide to Data Access Objects" in the
"Professional Features" book that came with VB.  The new structures
are superior to the old, but as far as I know, it is still suppose to
be backwards compatible.  There are some differences in the data control
that you need to account for.

My personal opinion is that the data control should not be used, with
one exception -- a read only list.  If you want your application to be
robust and polished, stay away from the data control and use DAO or if
you are developing a client/server system use RDO (Enterprise Edition).
My reasons for this are numerous, but the heaviest concern is speed and
memory.

If you continue to use the data control, read the above referenced article
for the differences between V3 and V4.

--
J. Kyle Rickett
__________________________________________________________________
Suppose you were an idiot. And suppose you were a
member of Congress.  But I repeat myself.
     -- Mark Twain
If you have Visual Basic questions, stop by my
-Ask the VB Guru- page at
        http://rampages.onramp.net/~jkyler/guru.htm


__________________________________________________________________

 
 
 

update method in vb 3.0 vs vb 4.0

Post by Paul Cho » Wed, 06 Dec 1995 04:00:00



Quote:

>The database methods have been restructured as described in
>Chapter 10, page 198 of the "Guide to Data Access Objects" in the
>"Professional Features" book that came with VB.  The new structures
>are superior to the old, but as far as I know, it is still suppose to
>be backwards compatible.  There are some differences in the data control
>that you need to account for.

>My personal opinion is that the data control should not be used, with
>one exception -- a read only list.  If you want your application to be
>robust and polished, stay away from the data control and use DAO or if
>you are developing a client/server system use RDO (Enterprise Edition).
>My reasons for this are numerous, but the heaviest concern is speed and
>memory.

>If you continue to use the data control, read the above referenced article
>for the differences between V3 and V4.

>--
>J. Kyle Rickett
>__________________________________________________________________

kyle:

i appreciate your input wrt my problem ... a couple of questions:

[1].  using dao's as opposed to data controls will be speedier and more
memory efficient ... how much better?  my client machines are 386/486
with 8 megs of rams ... am i going to get marginally better performance
from dao's?  any paper of this subject?

[2].  bounds controls will generate an "action" for the _validate event
of the data control when changes are made.  if i'm using data objects
instead, do i have to check the .datachanged property for each of the
fields/boxes?

again, thanks for your input.

--------
paul chow

 
 
 

1. Trouble Porting VB 3.0 SQLServer App to VB 4.0 and Oracle

We are in the process of moving our application from VB 3.0 and SQLServer 4.2 to VB 4.0 and Oracle 7.2.  We
are having trouble connecting to our Oracle database via ODBC.  We have configured the datasource using the
32-bit ODBC setup tool, and we have SQL*Net 2.2 installed.  We are able to connect to this datasource using MS
Query 32-bit version and through Crystal Reports.  But we are unable to connect to the database using the VB
4.0 version of our application.  We are using the same datasource as the two other programs mentioned.  We are
getting a "3146 ODBC Call failed" error when trying to execute the first SQL statement after our database
connect.  I'm not sure if the database connect statement is even successful.  Any insight would be
appreciated.

thanks - Brent

2. Problem importing TXT Files

3. Text - ODBC Driver - VB 3.0 to VB 4.0

4. UniVerse GCI: What are the real limits?

5. VB 3.0 to VB 4.0 problem

6. Locking up

7. Converting VB 3.0 app to VB 4.0

8. Raima editor

9. Will VB 3.0 DLLs Overwrite VB 4.0 (32 bit) DLLs

10. Help please: VB 3.0 pro to VB 4.0 pro

11. Text - ODBC Driver - VB 3.0 to VB 4.0

12. VB 4.0a enterprise vs VB 4.0