ODBC Connection string

I am trying to connect to mas via a vbs connection string. Shown below are several strings I have found and I either get driver mismatch error or data source not found. Running MAS90 4.4 pu6 on windows 7 64bit. Can any advise what I may be missing? I believe the third string shown below should be the one that should work.

 

'strConnectionString = "DRIVER=J_SOTAMAS90; UID=xxx|comp; PWD=xxxx; Directory=C:\Sage Software\Clean\MAS90; Prefix=C:\Sage Software\Clean\MAS90\SY\, C:\Sage Software\Clean\MAS90\==\; ViewDLL=C:\Sage Software\Clean\MAS90\Home; LogFile=\PVXODBC.LOG; CacheSize=4; DirtyReads=1; BurstMode=1; StripTrailingSpaces=1; SERVER=NotTheServer"

'strConnectionString = "DRIVER=C:\windows\SysWOW64\pvxodbc.dll; UID=xxx|comp; PWD=xxxx; Directory=C:\Sage Software\Clean\MAS90; Prefix=C:\Sage Software\Clean\MAS90\SY\, C:\Sage Software\Clean\MAS90\==\; ViewDLL=C:\Sage Software\Clean\MAS90\Home; LogFile=\PVXODBC.LOG; CacheSize=4; DirtyReads=1; BurstMode=1; StripTrailingSpaces=1; SERVER=NotTheServer"

 

strConnectionString = "DSN=J_SOTAMAS90;UID=xxx|com;PWD=xxxx;Directory=C:\Sage Software\Clean\MAS90\;SERVER=NotTheServer"

'strConnectionString = "DSN=SOTAMAS90;UID=xxx|comp;PWD=xxxx" Set objMASConnection = CreateObject("ADODB.Connection") objMASConnection.Open strConnectionString

 

  • Yes. I'm using 32 bit. When executing i use the cscript xxxxxx.vbs from a command prompt.

  • I forgot to add that the J_SOTAMAS90 drive is setup as a system DSN and it test good.

  • Here is what ended up working for me:

     

    Start Button Run: %windir%\SysWoW64\cmd.exe

     

     

    My String Statement:

     

     

    strConnectionString = "DSN=J_SOTAMAS90;UID=xxx|ABC;PWD=xxxx;Directory=C:\Sage Software\Clean\MAS90;LogFile=\PVXODBC.LOG;DirtyReads=1;BurstMode=1;StripTrailingSpaces=1;SERVER=NotTheServer"

     

    The only problem I have now is I'm prompted for login during the execution of my script. Another topic in another thead!