Skip to main content

Error trying to import table from IDEA with multiple tables

It only tells me an error on line 9, but it does not specify the error that it is.
 
Sub Main
Call ODBCImport()'
End Sub
 
 
' Archivo -Asistente de importación: ODBC
Function ODBCImport
dbName = "FISA.TCLI_CLICTA.IMD"
Client.ImportODBCFile "" & Chr(34) & "FISA" & Chr(34) & "." & Chr(34) & "TCLI_CLICTA" & Chr(34) & "", dbName, FALSE, ";DSN=BLH9I.world;UID=mgortiz;PWD=_IDEA922_012010062027024086039027105003094003018;DBQ=BLH9I.WORLD;DBA=W;APA=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 clc_mod, clc_cue, clc_orden, clc_codcli,cli_nombre, m.mon_des, d.des_descripcion,clc_titular from tcli_clicta cl, tcli_persona c, tgen_moneda m, tgen_desctabla d where d.des_codtab = clc_codtab and d.des_codigo = clc_tiporel and m.mon_cod = cl.clc_mon and c.cli_codigo = cl.clc_codcli and exists(select 1 from tcli_clicta lc where lc.clc_cue = cl.clc_cue and lc.clc_titular is not null) and exists(select 1 from vmtdom_productos v where v.cuenta=cl.clc_cue) order by 1, 2, 3"
Client.OpenDatabase (dbName)
End Function
 

ortizmario6025… Fri, 05/26/2023 - 10:47

yes,
I have made other similar ones, but this one only tells me that there is an error in line 9, but I will try to do it on my own. thank you

Brian Element Fri, 05/26/2023 - 12:11

I am just wondering if the table name is correct as it looks strange.  This is what you are sending:

"FISA"."TCLI_CLICTA"

ortizmario6025… Mon, 05/29/2023 - 09:00

"FISA"."TCLI_CLICTA"
Yes, when I import it alone, that's how it puts the name

ortizmario6025… Mon, 05/29/2023 - 09:14

Thanks, I was able to solve it
Sub Main
Call ODBCImport()'
End Sub
 
 
' Archivo -Asistente de importación: ODBC
Function ODBCImport
dbName = "Ejemplo.IMD"
Client.ImportODBCFile "" & Chr(34) & "dbo" & Chr(34) & "." & Chr(34) & "AA" & Chr(34) & "", dbName, FALSE, ";DSN=BLH9I.world;UID=lthen;PWD=_IDEA922_011003062013016065041007050082093022;DBQ=BLH9I.WORLD;DBA=W;APA=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 clc_mod, clc_cue, clc_orden, clc_codcli,cli_nombre, m.mon_des, des_descripcion,clc_titular from tcli_clicta cl, tcli_persona c, tgen_moneda m, tgen_desctabla d where d.des_codtab = clc_codtab and d.des_codigo = clc_tiporel and m.mon_cod = cl.clc_mon and c.cli_codigo = cl.clc_codcli and exists(select 1 from tcli_clicta lc where lc.clc_cue = cl.clc_cue and lc.clc_titular is not null) and exists(select 1 from vmtdom_productos v where v.cuenta=cl.clc_cue) order by 1, 2, 3 "
Client.OpenDatabase (dbName)
End Function