Wednesday, August 18, 2010

How do I connect to a remote Oracle server using Classic ASP?

Can someone give me a connection string to connect to an Oracle server on another server?





I'm coding in classic ASP on a windows server... I can't setup ODBC so I'd like a dsn-less connection.





Act as if, the user ID (schema) in new_apps is ';username';, with the password ';password';. The TCP/IP address for new_apps is 114.91.65.12 on port 1521.





Can you help?How do I connect to a remote Oracle server using Classic ASP?
Your server is going to need a driver for Oracle. That means ODBC or OLE. You need one or the other in order to connect.





Assumung you truly cannot use ODBC, which I doubt, here's an OLE connection string using Data Access Components:





';Provider=MSDAORA;Data Source=114.91.65.12:1521; User ID=userName; Password=userPassword;';





If that doesn't work, you can try this:





Provider=OraOLEDB.Oracle; Data Source=114.91.65.12:1521; User Id=myUsername; Password=myPassword;





And I'd go ahead and try ODBC, since I've never heard of a Web server with OLE but without ODBC:





Driver={Microsoft ODBC Driver for Oracle}; ConnectString=114.91.65.12:1521; Uid=myUsername; Pwd=myPassword;





In all the strings above, you need to remove the spaces following semicolons (;)

No comments:

Post a Comment