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@...
Offline
Last seen: 2 months 3 weeks ago
Joined: 09/03/2021 - 11:54
The syntax looks fine. Are you getting this from the history? Did you try running it manually?
Hello, yes if you run it manually and it works, and use sql minifier online
Is that piece of code from the history?
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
I am just wondering if the table name is correct as it looks strange. This is what you are sending:
"FISA"."TCLI_CLICTA"
"FISA"."TCLI_CLICTA"
Yes, when I import it alone, that's how it puts the name
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
Good that you were able to get it to work, good luck on your project.