This topic contains 1 reply, has 1 voice, and was last updated by bceamer 8 years, 11 months ago.
Parameter 'API' is required error
You must be logged in to reply to this topic.
This topic contains 1 reply, has 1 voice, and was last updated by bceamer 8 years, 11 months ago.
I have:
local OracleMod = require “OracleMod”
function main(data)
local conn = connectOracle(‘T01291.WORLD’,’V500_RPT’,’REPORT’)
conn.query{sql=”SELECT COLUMN_NAME FROM DBA_TAB_COLUMNS WHERE TABLE_NAME = ‘PERSON'”}
end
My module is:
function connectOracle(vInstance, vUserid, vPassword)
local conn = db.connect{api=db.ORACLE_OCI,name=vInstance,user=vUserid,password=vPassword,live=true }
return conn
end
When I execute, I get the “Parameter ‘api’ is required” error. , since I am not passing it in, and hard coding it, why am i getting th is error?
Found it
conn:query{sql=”SELECT COLUMN_NAME FROM DBA_TAB_COLUMNS WHERE TABLE_NAME = ‘PERSON'”}
I had conn.query, which worked while it was in Main(), but the : notation is used in modules, from what I can figure out.
You must be logged in to reply to this topic.