What do I need for connectivity for Oracle from ASP:<BR><BR>This question is a very valid question for most people beginning and experienced with Oracle from within ASP. Because of the variety of things that are needed, there can be many answers to this question. Here are the basics: <BR><BR>SQL*Net needs to be loaded on the machine where IIS resides. <BR>A "System" DSN (Data Source Name) should be configured on the machine where IIS resides. Or you may use a "DSNless" connection. A connection of this type still requires you have the correct ODBC driver. See below. <BR>Your DSN connection consists of an ODBC driver. Here are your most utilized choices: <BR>Microsoft ODBC Driver for Oracle (Microsoft supplied driver) <BR>Microsoft ODBC for Oracle 2.573.3513.00 (Microsoft supplied driver) <BR>Oracle ODBC Driver 7.x or 8.x (Oracle supplied driver) <BR>Most people prefer to use the Microsoft ODBC Driver for Oracle 2.0 for the reason that is seems to be more stable than the 2.5 driver from MS. <BR><BR>The Oracle ODBC Driver has a variety of incompatibility problems with ASP and it is not recommended to use this driver.<BR><BR>Make sure you’ve tested the DSN before you implement. This will prevent you from having to deal with connectivity problems at this level while developing.<BR><BR>The TNSNAMES.ORA file needs to have been configured on the machine where IIS resides. This file is located in you ORANTNETWORK (or NET80)ADMIN directory. An Example configuration is provided below: <BR>orcl.world = <BR><BR> (DESCRIPTION = <BR><BR> (ADDRESS_LIST = <BR><BR> (ADDRESS = <BR><BR> (COMMUNITY = tcp.world)<BR><BR> (PROTOCOL = TCP)<BR><BR> (Host = THE IP ADDRESS OF YOUR HOST OR DNS NAME)<BR><BR> (Port = 1521)<BR><BR> )<BR><BR> (ADDRESS = <BR><BR> (COMMUNITY = tcp.world)<BR><BR> (PROTOCOL = TCP)<BR><BR> (Host = THE IP ADDRESS OF YOUR HOST OR DNS NAME)<BR><BR> (Port = 1526)<BR><BR> )<BR><BR> )<BR><BR> (CONNECT_DATA = (SID = ORCL) <BR><BR> )<BR><BR> )<BR>Some things to note are the HOST, CONNECT_DATA, and PORT parameters. <BR><BR>The host is the IP address or DNS name of the machine where the Oracle instance (database) you are trying to connect to resides. <BR>The CONNECT_DATA string is made up of the Oracle SID. The SID is the name of the Oracle Instance. <BR>The PORT parameter is defaulted to 1521 and 1526. These are the default installations where the listener listens for requests from the machine where Oracle is installed. <BR>What does a connection string to Oracle look like?<BR><BR>Set AUM = Server.CreateObject("ADODB.Connection")<BR><BR>AUM .Open Connect_String(DSN), USERNAME, PASSWORD<BR><BR>How do you configure the Oracle ODBC Driver?<BR><BR>To configure the ODBC driver, you will first need to : <BR><BR>open the "ODBC Data Sources" icon in the control panel applet. <BR>Once opened, go to the "System DSN" tab and choose add. Select an ODBC driver (See "WHAT DO I NEED FOR CONNECTIVITY FOR ORACLE FROM ASP"). <BR>Once selected, you will see the following screen minus everything below connect string. If you want the advanced configuration as shown below select options. <BR><BR><BR>* The above example is utilizing the "Microsoft ODBC Driver for Oracle" driver.<BR><BR> I’m getting an error with my SQL statement and I don’t know why!<BR><BR>This problem seems to come up quite often. Rest assured, it is not just common to Oracle. Most of the time this problem is because the developer has not tested the SQL statement in question via a SQL tool (i.e. SQL Plus for Oracle or ISQL in SQL Server). Some of the steps you should take when debugging are: <BR><BR>ALWAYS run your command through SQL*PLUS if your statement fails. This way you eliminate the fact that it could be a syntax problem with Oracle. <BR>If you have successfully tested the statement against the database outside of ASP, make sure your statement is syntactically correct with ADO. <BR>Make sure all concatenated statements have the correct spaces in them. <BR>sqlChk = "SELECT COUNT(NAME)"<BR><BR>sqlChk = sqlChk & " FROM MYAPP_USERS"<BR><BR>sqlChk = sqlChk & " WHERE NAME = UPPER(&#039" & Request.Form("txtUserID") & "&#039)"<BR><BR>* Note: Although eliminating the number of lines for interpretation can optimize your code, some prefer readability to the slight performance increase.<BR><BR>If you were to look closely, you would notice that the second and third line have a space between the start of the clause and the ". Another method to insure proper spaces between concatenated statements would be to put the space at the end of each line.<BR><BR>Response.Write your sql statement to the screen. <BR>Make sure that you DO NOT have spaces in your table names. <BR>I keep getting a TNS error while trying to connect.<BR><BR>Check the following: <BR><BR>Insure that you can connect via SQL*PLUS. This will confirm that your TNSNAMES.ORA file is configured properly. If not, check the following: <BR>Verify the instance is running (i.e. Oracle is up). <BR>Make sure you have a TNSNAMES.ORA entry. See "WHAT DO I NEED FOR CONNECTIVITY FOR ORACLE FROM ASP". <BR>Check to see that the "TNS listener" service is running on the machine where Oracle resides. <BR>Check to make sure that you have the correct ODBC driver. See "WHAT DO I NEED FOR CONNECTIVITY FOR ORACLE FROM ASP". <BR>If you can connect via SQL*PLUS, check the following: <BR>Check to make sure that you have the correct ODBC driver. See "WHAT DO I NEED FOR CONNECTIVITY FOR ORACLE FROM ASP". <BR><BR><BR>