3 Replies - 14454 Views - Last Post: 12 July 2006 - 11:06 AM Rate Topic: -----

#1 StephanBotha  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 55
  • Joined: 12-March 06

ADODC vs. Data Control (VB6)

Posted 10 July 2006 - 11:29 PM

To edit records in a DB using the normal Data Control you start off with this code:

datClients.Recordset.Edit


How do you edit records in a DB using a ADO Data Control?

adoClients.Recordset.EditMode


The above ADO statement doesn't work.

Any ideas?
Is This A Good Question/Topic? 0
  • +

Replies To: ADODC vs. Data Control (VB6)

#2 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Re: ADODC vs. Data Control (VB6)

Posted 11 July 2006 - 03:31 AM

I can't provide you a direct answer as I'm not near Visual BASIC IDE right now.

What Error does it give? I don't think EditMode is a function. I think it's a property.

What values have you given for these properties of the ADODC Control:
  • .Mode
  • .LockType

Was This Post Helpful? 0
  • +
  • -

#3 ChandraRam  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 02-July 06

Re: ADODC vs. Data Control (VB6)

Posted 12 July 2006 - 03:47 AM

View PostStephanBotha, on 10 Jul, 2006 - 10:21 PM, said:

To edit records in a DB using the normal Data Control you start off with this code:

datClients.Recordset.Edit


How do you edit records in a DB using a ADO Data Control?

adoClients.Recordset.EditMode


The above ADO statement doesn't work.

Any ideas?


Hi
The ADODC doesnt have an explicit Edit method. If your recordset is opened dynamically, you can automatically assign values to the various fields and just use the update method to commit the values to the database.

HTH

Chandra
Was This Post Helpful? 0
  • +
  • -

#4 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Re: ADODC vs. Data Control (VB6)

Posted 12 July 2006 - 11:06 AM

Yes True.
I always discourage people to use ADODC.
Try learning ADODB.It might mean extra code but it's much more clearer to think and write code in terms of ADODB because you have complete control.
ADODC doesn't permit you to achieve a lot of things.

That's why ADODB is used by Professionals for Database Applications.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1