Hi again.
I want to open another database from navision (Ms. Access). I'm using Microsoft ActiveX Data Objects 2.8 Library. But i have problem with recordset. How to use it ?
Thank you.
Sorry, i ask again
I can't open the fields and i don't know if the connection is right.
Coz no error.
I use recordcount but its wrong count.
Thanx again.
Comments
Have you tried the search functionality?
Here is a start.
http://www.mibuso.com/forum/viewtopic.php?t=2976&highlight=recordset+access
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
But thank you.
I can't open the fields and i don't know if the connection is right.
Coz no error.
I use recordcount but its wrong count.
Thanx again.
I have tried and it works.
IF ISCLEAR(ADOConnection) THEN
BEGIN
IF NOT CREATE(ADOConnection) THEN
ERROR('Can no create ADO Connection automation.');
ADOConnection.ConnectionString('provider=Microsoft.Jet.OLEDB.4.0');
ADOConnection.Open('c:\wiro\database-gwe.mdb');
IF ISCLEAR(adoRS) THEN
BEGIN
IF NOT CREATE(adoRS) THEN
ERROR('Can not create ADO Recordset automation.');
strSQL := 'select * from Employee';
RecordsAffected := '';
rsOption := 0;
adoRS := ADOConnection.Execute(strSQL,RecordsAffected,rsOption);
adoRS.MoveFirst;
REPEAT
ii := ii + 1;
VariantName := 'Name';
adoField := adoRS.Fields.Item(VariantName);
VariantValue := adoField.Value;
MESSAGE('%1\Name : %2\Index : %3',ii,adoField.Name,VariantValue);
adoRS.MoveNext;
UNTIL adoRS.EOF;
END;
END
ELSE
MESSAGE('Component is not clear.');