thornmastr
Programmer
I have created a disconnected recordset as follows:
310 Set rsInventory = New ADODB.Recordset
320 With rsInventory
330 .Fields.Append "ProductID", adChar, 20
340 .Fields.Append "Descript", adChar, 80
350 .Fields.Append "Price", adChar, 10
360 .Fields.Append "SKU", adChar, 50
370 .Fields.Append "QTY", adNumeric
380 .Fields.Append "Barcode", adChar, 20
390 .Fields.Append "Vender", adChar, 50
400 .Fields.Append "Category", adChar, 50
410 End With
The following code partially updates the recordset:
With rsprod
rs.AddNew
rs!ProductID = !ProdID
rs!Descript = !Product
rs!Price = Format(!Price, "##,##0.00")
rs!Sku = !Sku
rs!barcode = !ProdID
rs!Category = svecat
value = rsprod("QRecd") - rsprod("QSold")
value = value + rsprod("QAdjust")
rs("qty") = value
Where rs is the disconnected recordset. Before the rs.update occurs the program crashes and burns at
Rs(“qty”) = value with a “Multiple-step operation generated errors” error. I have been able to narrow this down. The qty field is not the right type. I have not been able to find out what constant is used with an append field to indicate a long numeric value. Where can I find a list of constants used to define variable types to a recordset.
I am using an Access 2002 database, using ADO, vb6 FRONT-END.
Any assistance would be most appreciated.
Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@earthlink.net
310 Set rsInventory = New ADODB.Recordset
320 With rsInventory
330 .Fields.Append "ProductID", adChar, 20
340 .Fields.Append "Descript", adChar, 80
350 .Fields.Append "Price", adChar, 10
360 .Fields.Append "SKU", adChar, 50
370 .Fields.Append "QTY", adNumeric
380 .Fields.Append "Barcode", adChar, 20
390 .Fields.Append "Vender", adChar, 50
400 .Fields.Append "Category", adChar, 50
410 End With
The following code partially updates the recordset:
With rsprod
rs.AddNew
rs!ProductID = !ProdID
rs!Descript = !Product
rs!Price = Format(!Price, "##,##0.00")
rs!Sku = !Sku
rs!barcode = !ProdID
rs!Category = svecat
value = rsprod("QRecd") - rsprod("QSold")
value = value + rsprod("QAdjust")
rs("qty") = value
Where rs is the disconnected recordset. Before the rs.update occurs the program crashes and burns at
Rs(“qty”) = value with a “Multiple-step operation generated errors” error. I have been able to narrow this down. The qty field is not the right type. I have not been able to find out what constant is used with an append field to indicate a long numeric value. Where can I find a list of constants used to define variable types to a recordset.
I am using an Access 2002 database, using ADO, vb6 FRONT-END.
Any assistance would be most appreciated.
Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@earthlink.net