Reputation: 43
Has anyone any experience with the PL SQL class INV_PREPROCESS_SCAN and how to call it from Oracle Mobile? There are a few documents online detailling the class itself and its function but none suggest how to ensure it is properly linked to Oracle Mobile.
The issue concerns scanning a barcode and filling the SQL table with the barcode information. At the moment the table remains empty after the barcode has been scanned.
The procedure I am trying to call when a barcode is scanned:
CREATE OR REPLACE PACKAGE BODY APPS.INV_PREPROCESS_SCAN AS
PROCEDURE process_scan(x_return_status OUT nocopy VARCHAR2,
x_processed_value OUT nocopy VARCHAR2,
p_current_page_name IN VARCHAR2,
p_scanned_value IN VARCHAR2) IS
g_sql_errm VARCHAR2(4000);
g_sql_code VARCHAR2(500);
BEGIN
INSERT INTO dummy(info, column2)
VALUES ('example', 'example2 ');
COMMIT;
INSERT INTO dummy(info, column2)
VALUES (p_current_page_name, p_scanned_value);
COMMIT;
x_return_status := 'S';
x_processed_value := p_scanned_value;
EXCEPTION
WHEN OTHERS THEN
g_sql_errm := SUBSTR(SQLERRM,1,500);
g_sql_code := SUBSTR(SQLCODE,1,500);
INSERT INTO dummy(info, column2)
VALUES (g_sql_errm, g_sql_code);
COMMIT;
END;
END INV_PREPROCESS_SCAN;
/
The Oracle Mobile Logs show the barcode is being read correctly but the SQL table remains empty.
Any help would be much appreciated
Upvotes: 1
Views: 180
Reputation: 43
The issue was resolved by changing the prefix of the scanner to Ascii value 92. This was done by opening the default_key.ini file and changing:
DATASTREAMINDICATOR:28
TO
DATASTREAMINDICATOR:92
Ensure you bounce the server.
With this set open Oracle mobile and when on the input screen ensure "ctrl" and "\" is held whilst you enter information. Press enter and the value will now be visible. The data should now appear in your Database.
Upvotes: 0