Results 1 to 3 of 3

Thread: Update records with Dataenvironment

  1. #1

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    Turkey
    Posts
    49
    Dear Friends,

    I have a dataenvironment as DE, a connection as cnn, a command as cmdOgrenci and it has a text field "CLASS".

    First, how can I update the field CLASS with an sql UPDATE statement on Dataenvironment? I want to change the first character of the field (e.g. 1-A ==> 2-A) while ignore the records begin with "A" and "Y" (ANA, YUVA etc.)

    Second what are the adv. and disadv. between ADO and Dataenvironment

    Thanks,

  2. #2
    Addicted Member
    Join Date
    Feb 1999
    Location
    Belfast
    Posts
    254
    Leontro,
    if you add a new command to the data environment and choose SQL statement option. Add a general update command to the SQL textbox( anything will do ). Then build the SQL command you want to execute as a string. If for example the command is called "comm_Update", and the string is ls_SQL then the following should work:


    DE.commands("comm_Update").commandText = ls_SQL
    call DE.comm_Update

    This should do the trick.

    HTH

    Lenin

  3. #3
    Addicted Member
    Join Date
    Feb 1999
    Location
    Belfast
    Posts
    254
    Leontro,
    programming with ADO has a couple of advantages in my opinion.

    1. You can built tranaction based components with ADO, not with DE.
    2. I feel that using the DE adds another layer of abstraction to the programmer, so evwen though it is very simple to implement, you are removed from the "nuts and bolts" of what is going on.
    3. DE is excellent for knocking together very quick db applicaitons at the expense of insight.

    If you need anything else let me know.

    Lenin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width