Sorry Tom. Maybe I didn't express myself well. First of all my OE v. is 10.2b.
The code below works well for any table except 'user'.
I can only deduce that the problem is relative to the 'user' table. That's all. 'User' table exist in the access database. Infact the error displayed is different when table doesn't exist in the DB.
DEFINE TEMP-TABLE ttEmpl NO-UNDO
FIELD EmplID AS INTEGER FORMAT "zzzzzz"
FIELD EmplName AS CHARACTER
FIELD EmplLastName AS CHARACTER .
chrQuery = "(Select * FROM user-info)".
Conn = NEW System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=C:\OB1\JCA\MDB\ingress.mdb;Persist Security Info=False;Jet OLEDB
atabase Password=ingress;").
Conn:Open().
Cmd = NEW System.Data.OleDb.OleDBCommand(chrQuery,conn).
Reader = Cmd:ExecuteReader().
DO WHILE Reader:Read():
CREATE ttEmpl.
ASSIGN
ttEmpl.EmplName = Reader["name"]:ToString()
ttEmpl.EmplLastName = Reader["lastname"]:ToString()
ttEmpl.EmplID = integer( Reader["userid"]:ToString()).
END.
Another proof is when I write the code in progress editor e press RUN:
SELECT * from user-info. That's right.
Instead WHEN write.
SELECT * from user. I receive a message error.
I hope to be clear.
many thanks.
G.