is nodbc dsn less possible?

tzikitzaketzikitzake Member Posts: 13
hi, I'm trying a dns-less odbc connection from excel 2007 VBA to Navision 4.03 with NODBC 4.0 but doesn't work (defining a DSN connection from Data Sources from Control Panel works fine). I have investigated about it, but I can't find an answer if it is possible or if it is neccessary to define a DSN (I think with c/odbc 3.70 was possible).My problem is that I need to change the company with VBA and don't know if it is possible using a DSN.

my code is like:
With ActiveSheet.QueryTables.Add(Connection:="ODBC;DRIVER={Microsoft Navision Driver};CSF=YES;NType=TCP;SName=xxxxxxxxxCN=yyyyyy;OPT=Text;UID=uuuuu;PWD=ppppppppp;PPath=C:\Archivos de programa\Microsoft Business Solutions-Navision\Client;CC=YES;BE=YES;CD=NO" _
, Destination:=Range("$A$1"))
.CommandText = Array( _
"SELECT ""Agrupaciones de coste"".Agrupación, ""Agrupaciones de coste"".Nombre" & Chr(13) & "" & Chr(10) & "FROM ""Agrupaciones de coste"" ""Agrupaciones de coste""")
.Name = "navision data"
.Refresh BackgroundQuery:=False
End With
Sign In or Register to comment.