|
 |
activex_data_objects thread: The Status property
Message #1 by "Riacardo LP" <ricardo.lopez@c...> on Fri, 9 Nov 2001 17:11:55
|
|
Error -2147217887 (80040e21)
Hi everybody
I´ve got problems when I try to manipulate the ADO adDBDate field type.
This are the steps that I made :
1. I open an ADO recorset from a FOXPRO database.
2. I make a copy of that recordset into a new identical temporal recordset.
3. I conect the temporal recorset to a Grid.
4. I Manipulate the Grid. The Grid automaticaly make changes to the
recordset.
5. When I try to update the original recordset with the temporal one an
error ocurrs.
I check the line that makes the error and is an assignment from one
adDBDate Field to another. The Staus property from the right one is
adFieldOverflow= 6.
I try to avoid this error making the assigment when the status property is
0 (The field is Ok). This is the code:
If fField.Status =0 Then
rsGrid.Fields(fField.Name) = rsTemp.Fields(fField.Name)
End If
But the assigment takes place unless the status = 6 .
Help me please.
Message #2 by Thomas Bellavia <TBellavia@V...> on Fri, 9 Nov 2001 12:19:42 -0500
|
|
Sounds like your data types don't match. Binding error...
-----Original Message-----
From: Riacardo LP [mailto:ricardo.lopez@c...]
Sent: Friday, November 09, 2001 12:12 PM
To: ActiveX_Data_Objects
Subject: [activex_data_objects] The Status property
Error -2147217887 (80040e21)
Hi everybody
I=B4ve got problems when I try to manipulate the ADO adDBDate field
type.
This are the steps that I made :
1. I open an ADO recorset from a FOXPRO database.
2. I make a copy of that recordset into a new identical temporal
recordset.
3. I conect the temporal recorset to a Grid.
4. I Manipulate the Grid. The Grid automaticaly make changes to the
recordset.
5. When I try to update the original recordset with the temporal one an
error ocurrs.
I check the line that makes the error and is an assignment from one
adDBDate Field to another. The Staus property from the right one is
adFieldOverflow=3D 6.
I try to avoid this error making the assigment when the status property
is
0 (The field is Ok). This is the code:
If fField.Status =3D0 Then
rsGrid.Fields(fField.Name) =3D rsTemp.Fields(fField.Name)
End If
But the assigment takes place unless the status =3D 6 .
Help me please.
tbellavia@v...
$subst('Email.Unsub')
Message #3 by "Ricardo LP" <ricardo.lopez@c...> on Fri, 9 Nov 2001 17:38:30
|
|
> Sounds like your data types don't match. Binding error...
The two recordsets are identical.
The data types are adDBDate.
if fField.Status = 0 then
.....error line---> rsGrid.fields(....)= rsTemporal.Fields(...)
Here, the program stops, I check the fField.Status and is equal to 6 so it
doesn´t have to execute the error line (because it is in the Then
statement). It has to execute the Else statement but it doesn´t.
If in the grid the rsTemporal´s Field is blank an error ocurrs, if in the
grid the same field has data there is not an error.
Message #4 by Thomas Bellavia <TBellavia@V...> on Fri, 9 Nov 2001 13:49:17 -0500
|
|
I've ran into that error before. For some reason, ADO throws an error
for a
NULL field value. Better to make an adjustment to this field if it is
blank
to avoid this. I make my number fields zero and text fields a blank
space. I
haven't looked into it any further however. Maybe MSDN would have an
explanation on why this is so...
-----Original Message-----
From: Ricardo LP [mailto:ricardo.lopez@c...]
Sent: Friday, November 09, 2001 12:39 PM
To: ActiveX_Data_Objects
Subject: [activex_data_objects] RE: The Status property
> Sounds like your data types don't match. Binding error...
The two recordsets are identical.
The data types are adDBDate.
if fField.Status =3D 0 then
.....error line---> rsGrid.fields(....)=3D rsTemporal.Fields(...)
Here, the program stops, I check the fField.Status and is equal to 6 so
it
doesn=B4t have to execute the error line (because it is in the Then
statement). It has to execute the Else statement but it doesn=B4t.
If in the grid the rsTemporal=B4s Field is blank an error ocurrs, if in
the
grid the same field has data there is not an error.
tbellavia@v...
$subst('Email.Unsub')
|
|
 |