Substitute the dates captured in the form.

3 posts / 0 new
Last post
ortizmario6025@...
Offline
Joined: 09/03/2021 - 11:54
Substitute the dates captured in the form.

I have an oracle database, and I need to extract the records from a table with the built-in idea odbc. the question is how do I substitute those form dates in the odbc import
example
 
bName = "tca_xxxIMD"
Client.ImportODBCFile "" & Chr (34) & "FISA" & Chr (34) & "." & Chr (34) & "tcap_tramon" & Chr (34) & "", dbName, FALSE, "; DSN = BLH9I.world; UID = mgortiz; PWD = _IDEA922_012010; DBQ = BLH9I.WORLDA; DBA = BLH9I.WORLDA; DBA = T; EXC = F; FEN = T; QTO = T; FRC = 10; FDL = 10; LOB = T; RST = T; BTD = F; BNF = F; BAM = IfAllSuccessful; NUM = NLS; DPM = F; MTS = T; MDI = F; CSR = F; FWC = F; FBS = 64000; TLO = O; MLD = 0; ODA = F; "," SELECT * FROM TCA_xxx where FECH> = '20210801' and FECHC <= '20210930' AND MOD = "S" AND MODO = 'Q' "Client.OpenDatabase (dbName
 
 

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

You could try something like this and hopefully it will work:


fech_date = "20210801"
fechc_date = "20210930"
Client.ImportODBCFile "" & Chr (34) & "FISA" & Chr (34) & "." & Chr (34) & "tcap_tramon" & Chr (34) & "", dbName, FALSE, "; DSN = BLH9I.world; UID = mgortiz; PWD = _IDEA922_012010; DBQ = BLH9I.WORLDA; DBA = BLH9I.WORLDA; DBA = T; EXC = F; FEN = T; QTO = T; FRC = 10; FDL = 10; LOB = T; RST = T; BTD = F; BNF = F; BAM = IfAllSuccessful; NUM = NLS; DPM = F; MTS = T; MDI = F; CSR = F; FWC = F; FBS = 64000; TLO = O; MLD = 0; ODA = F; "," SELECT * FROM TCA_xxx where FECH> = '" & fech_date & "' and FECHC <= '" & fechc_date & "' AND MOD = "S" AND MODO = 'Q'
ortizmario6025@...
Offline
Joined: 09/03/2021 - 11:54

Hello,
thank you very kind