Home > Software engineering >  Consult a great god: recordset domain assignment problem
Consult a great god: recordset domain assignment problem

Time:09-24

I get a string from the Excel table "printer. HP", to "printer. HP" is assigned to the adodc. You. The fields (0) value, after the operation errors,
When I put the string of ". "to get rid of, can be assigned to a string adodc. You. The fields (0) value, consult a great god, how can I put the string" printer. HP "assigned to adodc. You. The fields (0). The value,

CodePudding user response:

Must first determine your fields (0) field is, the character data in the data when cast as a string: XX=CStr (printer. "HP"), that is ok,
If you only store the printer. HP, so English comma in the middle of the program that is separator, will go wrong, of course,
Adodc1. You. Fields (0)=printer. HP, so that it will go wrong;
Adodc1. You. Fields (0)="printer. HP", so that should not have errors;
Best: Adodc1. You. Fields (0)=CStr (printer. "HP"), cast as a string,

CodePudding user response:

Stick your error code first
  • Related