• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    ASE, SQL, OLE, ADE

    Reply
    New Member
    tpohara
    Posts: 1
    Registered: ‎08-27-2011

    LISP, AutoCAD 2011 and the Oracle initial Connection code

    420 Views, 0 Replies
    08-27-2011 12:50 PM

    Hello,

    I am using AutoCAd 2011 and Oracle 9.3. I am using the 'Oracle Provider for OLE DB' I am very familiar with AutoCAd and with Oracle and connection between the client and the server Oracle portions.

    Inside of AutoCAD I can connect fine using the dbconnect menu. I am able to query etc with AutoCAD. No issues there.

    I am UNABLE  to get LISP to connect no matter what I try. This seems like a very commoon issue for many developers (based on what I can see from a google query).

     

    I am having trouble the getting the initial connection to work in LISP.

    As you can see I am trying to use the ADOLISP library.

    I would appreciate any input.

    Thanks in advance.

     

    Code example:


      (setq ConnectString "Driver=OraOLEDB.Oracle;DBQ=TEST_SID;UID=TestAdmin;Pwd=test")
      (prompt (strcat "\n\nConnecting to the database using \n\""
                      ConnectString
                      "\""
              )
      )
      (if (not (setq ConnectionObject
                      (ADOLISP_ConnectToDB ConnectString "TESTAdmin" "test")
               )
          )
        (progn
          (prompt "\nConnection failed!")
          (ADOLISP_ErrorPrinter)
        )
        (prompt "\nResult: succeeded!")
      )


    Error:

    Connecting to the database using
    "Driver=OraOLEDB.Oracle;DBQ=TEST_SID;UID=TESTAdmin;Pwd=test"
    Connection failed!
    Visual LISP message           Automation Error. [Microsoft][ODBC Driver
    Manager] Data source name not found and no default driver specified
    Description        [Microsoft][ODBC Driver Manager] Data source name not found
    and no default driver specified
    HelpContext        0
    HelpFile
    NativeError        0
    Number              -2147467259
    SQLState      IM002
    Source              Microsoft OLE DB Provider for ODBC Drivers

     

    Please use plain text.