problem in assigning values to ado fields from normal data control 
Author Message
 problem in assigning values to ado fields from normal data control
Hello Group,

I faced a problem in assigning values to ado fields from normal data
control.

Below is the code:

Adodc1.recordset!bdate = Data1.recordset!mydate

The above code gives "Automation error" on some machines. I have used below
code to overcome the runtime error.

x = Data1.recordset!mydate
Adodc1.recordset!bdate = x

Any ideas, suggestions to reduce my time and code size ?

Thanks,
Hakimi



Fri, 02 Apr 2004 19:00:33 GMT
 problem in assigning values to ado fields from normal data control

The problem is most certainly in the difference between ADO and DAO field
objects. Assigning a DAO field value to an ADO field value. Your code that
works is most likely the best solution. In fact, I'm surprised it works at
all on some machines.

You may also have some success using the following:

Adodc1.recordset!bdate = CDate(Data1.Recordset!MyDate)

Also, you might try:

Adodc1.recordset!bdate.value = CDate(Data1.Recordset!MyDate.Value)

Hope this helps!

Steven Bras, MCSD
Microsoft Developer Support/Visual Basic WebData

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
reserved.



Sun, 04 Apr 2004 01:42:41 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Assigning Null Values to data bound fields using remote data control

2. assign null value in ado date field

3. Assigning Null value to field of ADO Recordset

4. AddNew, assign field values - Request.Form problem

5. Problems assigning a DAO-recordset to a data control - Need help

6. how to assign a default value to a field based on another field

7. Problems with ADO Data Control in User Controls

8. 80040e21 error using ADO and ORAOLEDB to assign numeric fields to another field

9. Problems with ADODB.Recordset objects and with the ADODC data control (recordset property) [Specificially when assigning a dynamically created RS to the RS property of the ADO data control]

10. Create User Control as Data Source Using ADO Data Control

11. Help ! ADO data control and standard data control

12. MS ADO Data Controls and Data Envrironment problem


 
Powered by phpBB® Forum Software