Problems with ms ado 2.8 in an win xp environment

iris2009iris2009 Member Posts: 56
Hello,

I have got the following problem. I am polling data from an access database. Nav Client is 6.2 Classic, installed on a Win xp machine.
Polling works fine, till you copy the correspondig codeunit from test database to the productive database. In this case you get the following, you get the following error message: "Assignment invalid. It is not possible to assign a _recordset to a recordset." (Orignial in german: "Ungültige Zuweisung. Es ist nicht möglich, ein _Recordset einer Recordset zuzuweisen."
When I delete the variables (recordset, etc.) and add them again, its working fine. But this is hardly a solution... Has anyone solved this??
Here is my code:

Name DataType Subtype Length
Field Automation 'Microsoft ActiveX Data Objects 2.8 Library'.Field
Fields Automation 'Microsoft ActiveX Data Objects 2.8 Library'.Fields
Connection Automation 'Microsoft ActiveX Data Objects 2.8 Library'.Connection
RecordsetFirst Automation 'Microsoft ActiveX Data Objects 2.8 Library'.Recordset

IF ISCLEAR(Connection) THEN CREATE(Connection);
Connection.Open('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + RhewaSetup."Database File Name");

IF Weighingdata.FINDFIRST THEN REPEAT
IF (Weighingdata.Type = Weighingdata.Type::Einfach) AND (Weighingdata."Reg No Singleweighing" = 0) THEN BEGIN
RecordsetFirst := Connection.Execute('Select * from Erstwaegung where barcode = ' +
FORMAT(Weighingdata.Barcode));
IF NOT RecordsetFirst.EOF THEN BEGIN
Fields := RecordsetFirst.Fields;
Sign In or Register to comment.