2010 Nov 04 11:07 AM
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''' ';'
INTO SQL.
CONCATENATE SQL 'Data Source=' '''
my.mdb''' ';'
INTO SQL.
CONCATENATE SQL 'Mode=' '''Share Deny None'''
INTO SQL.
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?
Thank you
Karen
Edited by: Karen Dean on Nov 4, 2010 7:15 AM
2010 Nov 04 11:15 AM
OUPS... SKIP READING THE FIRST LINE
Hi,
Isn't there a missing FROM in your SELECT statement ?
Just for reference : https://wiki.sdn.sap.com/wiki/display/Snippets/ReadingdatafromMSAccess+table
Best regards,
Guillaume
Edited by: Guillaume Garcia on Nov 4, 2010 12:17 PM
2010 Nov 04 11:15 AM
OUPS... SKIP READING THE FIRST LINE
Hi,
Isn't there a missing FROM in your SELECT statement ?
Just for reference : https://wiki.sdn.sap.com/wiki/display/Snippets/ReadingdatafromMSAccess+table
Best regards,
Guillaume
Edited by: Guillaume Garcia on Nov 4, 2010 12:17 PM
2010 Nov 04 11:16 AM