osql.exe on W7 x64
-
Tuesday, February 05, 2013 1:43 PM
Hi
I have a script that uses osql.exe that runs perfect on all XP and W7 x86 machines.
We now have some W7 x64 machines and osql.exe seems not to be able to run on these.Is there a version of osql.exe that I can use on W7 x64?
Thanks and best regards
Franz
All Replies
-
Tuesday, February 05, 2013 1:53 PM
-
Tuesday, February 05, 2013 2:02 PM
Can you provide some more information, what you mean with "seems not to be able ..."? Do you get an error message or ...?
WshShell.Run (TargetPath & "osql.exe -E -DSERVER1 -i" & TargetPath & "Call_SQL_Imp.sql",0,True)
returns with 1 on W7 x64 and with 0 on XP/W7 x86.Contents of Call_SQL_Imp.sql:
exec name.dbo.GetCADList 'CADimport.txt','Y'
Additional info:
The local sql.log from the ODBC administrator show the following error:
DIAG [IM014] [Microsoft][ODBC Driver Manager] Der angegebene DSN weist eine nicht übereinstimmende Architektur von Treiber und Anwendung auf. (0)- Edited by Franz Leu Tuesday, February 05, 2013 2:59 PM
-
Tuesday, February 05, 2013 3:41 PM
I found the solution.
I didn't notice that the local ODBC Data-source configuration has to be done for x86 and x64 separately. Unfortunately, the System-control panel lists only the x86 configuration app, so its easy to miss the x64 version located in sysWOW64.
After adding the datasource in there too, everything is running as supposed.Thanks anyway and best regards
Franz- Marked As Answer by Franz Leu Tuesday, February 05, 2013 3:41 PM

