SORRY. I HAVE NOW SOLVED THE PROBLEM. I WAS JUST MISSING THE WORD FROM IN THE STATEMENT.
I'm trying to read a table from an Access database using OLE2.
The first part of my code seems to work when opening the databse. I get sy-subrc = 0.
CONCATENATE 'Provider=' '''Microsoft.Jet.OLEDB.4.0''' ';'
CONCATENATE SQL 'Data Source=' '''
CONCATENATE SQL 'Mode=' '''Share Deny None'''
MDB connection ...
CALL METHOD OF CON 'Open'
EXPORTING #1 = SQL.
However when I try to select from the database table using the code below I get sy-subrc = 2.
Query (select) statement ...
SQL = 'select * myTable'.
Query run ...
CALL METHOD OF REC 'Open'
EXPORTING #1 = SQL
#2 = CON
#3 = '1'.
Does anyone know what I'm doing wrong?
Edited by: Karen Dean on Nov 4, 2010 7:15 AM