none
Unable to create ODBC DSN (Oracle) using vb script in Windows7 system

    Question

  • Hi,

    I have a vbscript (createdsn.vbs), which will create the oracle ODBC DSN in the system windows7 OS).

    I tried to execute this script and receiving the User defined error message as below:

               'Create DSN Failed'


    Please find the source code below used to create Oracle ODBC.

    Set myDSN = New Dsn
    CreateTheDSN = myDSN.CreateDSN("ODBCTestDSN","Oracle in OraClient11g_home1","DBTest","","userid","pwd","APPODBC", true, "")

    Please advise on this.

    Regards,

    Monday, August 02, 2010 12:25 PM

Answers

  • You don't indicate which line raises the error, but I believe the first line you posted is invalid in VBScript. The code is probably Visual Basic.

    Richard Mueller


    MVP ADSI
    Tuesday, August 10, 2010 1:38 PM
    Moderator

All replies

  • Right-clicking on cmd.exe and left-click on Run as administrator. Now in the new cmd window type Cscript <path to your vbs> and hit enter on your keyboard.

    In Win 7 you need to run your vbs with elevated rights and that is the easiest way to do it. See if this helps.


    v/r LikeToCode....Mark the best replies as answers.
    Monday, August 02, 2010 8:48 PM
    Moderator
  • Hi

    I tried the above steps mentioned and receiving the same error message

    Tuesday, August 10, 2010 1:15 PM
  • You don't indicate which line raises the error, but I believe the first line you posted is invalid in VBScript. The code is probably Visual Basic.

    Richard Mueller


    MVP ADSI
    Tuesday, August 10, 2010 1:38 PM
    Moderator