ASP ODBC

Here is my situation:
I am trying to open a connection to Oracle 9i via ASP, but I haven't accomplished doing so!
The message shown is : specified driver cannot be loaded system error 5 (oracle in orahome92).
Please help!!!

this is how I've done it using ADO with an ODBC connection:
in separate file
<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_conn_STRING
MM_conn_STRING = "Driver={Microsoft ODBC for Oracle};Server=;UID=;PWD=;"
%>
in your .NET page:
<!--#include file="#FILENAME FROM ABOVE#" -->
You must have the ODBC DNS set up and verify you can connect (Usually you will need to play around with the TNSnames on the machine) Assuming you are developing on your PC, the Server mus also match with ODBC and TNSNAMES. I'll see if I can find an ODBCConn example

Similar Messages

  • ORACLE 8i/ASP/ODBC/ADO/OO4o/XML

    I want to call Oracle 8i stored function
    to insert data into a database.
    Does anybody know the syntax.
    I am trying to use
    Set Conn = Server.CreateObject("ADODB.Connection")conn.Open "p2k","peltyszw","welcome"
    set cmd=server.CreateObject("ADODB.Command")
    cmd.CommandType=4
    cmd.CommandText="declare x integer:=0;BEGIN x:=sp_ww; END;"
    cmd.ActiveConnection=conn
    set p1=cmd.CreateParameter("user_id",200,1,30,13)
    cmd.Parameters.Append p1
    set p2=cmd.CreateParameter("query_name",200,1,30,"dk")
    cmd.Parameters.Append p2
    set p3=cmd.CreateParameter("sql_string",200,1,30,"select * from Project")
    cmd.Parameters.Append p3
    set p4=cmd.CreateParameter("query_id",200,1,30,13)
    cmd.Parameters.Append p4
    'set p5=cmd.CreateParameter("retval",adBSTR,adParamOutput,300,2)
    'cmd.Parameters.Append p5
    cmd.execute
    conn.close
    set conn=nothing
    cmd.Cancel
    set cmd=nothing
    I tried using 0040. But no success.
    Thanks
    null

    The connection problem was resolved today.
    When the server was set up, there were two partitions created.
    A C drive for the system and a D drive for the applications.
    Permissions for "Everyone" had not been granted on the
    application drive D.
    Once permissions were granted to "Everyone" for all folders and
    files on drive D, ASP / ADO / IIS 5 had no problem finding the
    appropriate Oracle native ODBC driver dll file(s) or OLE DB dll
    (s).
    This problem did not arise on the test server since FAT has been
    used as the file system. NTFS is more particular with regards
    to file / folder security.

  • ASP pages and Oracle ODBC Driver

    I have a number of ASP pages that need to be updated to connect to Oracle using the ORACLE ODBC driver. Currently, these pages connect using the Microsoft ODBC driver for Oracle. I do not know of all the details yet as I havent seen the pages or network for which they reside on and I havent been supplied with details on version information. I would assume I am working with recent versions of all software.
    What Im curious about is if anyone has done this sort of driver change before and if you have any suggestions on how I would go about doing this, or if there are things that I need to be aware of that arent evident at first glance.
    Again, I am switching from the odbc driver provided by Microsoft to a version of the odbc driver provided by Oracle.
    Thanks for any and all information.

    I'll assume that there is some reason that necessitates switching drivers. If there's not going to be a benefit, I'd suggest not changing.
    That said, changing drivers should be relatively painless. If your ASP makes database connections using DSN's, simply go to the ODBC Data Source Administrator, rename the old Microsoft DSN, and create a new DSN using the Oracle driver with the name your ASP is looking for. If your ASP specifies the ODBC driver in its connect string, you'll have to modify all the ASP connect strings to use the Oracle driver. If all goes well, your ASP will now be up & running using the Oracle driver.
    As we all know, however, reality and theory are often at odds with each other. While your ASP should be connecting to the database correctly when you make these changes, please do some thorough testing to verify that everything works like you expect. The ODBC specification permits drivers to have a variety of behaviors in certain conditions. Applications written with one ODBC driver often end up relying on one of these behaviors, and may break when the ODBC driver changes.
    Justin Cave
    ODBC Development

  • ODBC mapping in asp script

    How do I code for oracle database in asp to interact with
    database? I know I may sound stupid in this.
    DSN:
    Set Conn = server.createobject("ADODB.Connection")
    Conn.Open "dsn=oradb;uid=test;pwd=test"
    Set Res = Server.CreateObject("ADODB.RecordSet")
    above is mapping to microsoft or oracle drivers? How about
    DSNless? like Driver or Provider?
    I'm still confused abt oracle ODBC mapping. I don't know how to
    write oracle DB connectivity for asp scripts.
    I'm grateful if anyone can help me in this.

    1) Are you sure that you get no results? It sounds like you are having name resolution issues, which would imply that you should be getting an ORA-00942 error indicating that the table doesn't exist (or that you don't have access to the table). If you are not seeing this error, I would tend to suspect an overzealous exception handler.
    2) What database account owns the table? What database account is your ASP.Net application using to connect? Assuming these two accounts are different, your application would either have to
    - Explicitly prefix the table name with the schema name
    - Have a public or private synonym that maps the table name to the fully qualified identifier schema_name.table_name
    - Issue the command ALTER SESSION SET CURRENT_SCHEMA = <<schema name>> in each session, in which case all queries in the session would use the specified schema name as the default if no schema name is prefixed.
    Justin

  • ASP Oracle ODBC Driver..can't connect

    I set up the DSN name in Control Panel on my server to go after a database on another server. used the connection tester to see if it would work...it did. So I put in the connection string inside my ASP on the server and I keep getting a can't resolve TNS error message. Why?.....
    I'm brand new at this so I may not have the connection string correct. Can someone help?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Thomas Szalewski ([email protected]):
    I set up the DSN name in Control Panel on my server to go after a database on another server. used the connection tester to see if it would work...it did. So I put in the connection string inside my ASP on the server and I keep getting a can't resolve TNS error message. Why?.....
    I'm brand new at this so I may not have the connection string correct. Can someone help?<HR></BLOCKQUOTE>
    configure net8,then go to odbc create dsn .In the select oracle8odbcdriver,in the service name give the net8 config name . i think this will help for your asp code.
    null

  • ODBC fails but only from ASP page (12154)

    I have a working Win2k/MDAC 2.6 box, that can connect perfectly to an Oracle 8.1.7 on another machine. I can TNS ping this host, I set up an ODBC DSN and I can connect from the Oracle ODBC Test program. I wrote a simple script (see below) to test the connection, and run it as a Windows script (i.e. double click on the file) and it runs perfectly. All is great.
    BUT, when I copy the exact same script into an ASP file (surround the script the the "<%" and "%>" delimiters) and run it, I get this:
    ORA-12154 TNS could not resolve service name.
    Anyone have any ideas why this script fails but ONLY from ASP??
    Here is my simple script:
    dim rs, conn
    set conn = CreateObject("ADODB.Connection")
    conn.open "ora817"
    Thanks very much,
    Marc Fairorth

    I am using asp connecting an oracle 8.1.5
    Using this :
    Set Conn=Server.CreateObject("ADODB.Connection")
    Set RS=Server.CreateObject("ADODB.RecordSet")
    Conn.Open Connection
    RS.open SQL1, Conn
    The only difference to your script is the server option
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Marc Fairorth ([email protected]):
    I have a working Win2k/MDAC 2.6 box, that can connect perfectly to an Oracle 8.1.7 on another machine. I can TNS ping this host, I set up an ODBC DSN and I can connect from the Oracle ODBC Test program. I wrote a simple script (see below) to test the connection, and run it as a Windows script (i.e. double click on the file) and it runs perfectly. All is great.
    BUT, when I copy the exact same script into an ASP file (surround the script the the "<%" and "%>" delimiters) and run it, I get this:
    ORA-12154 TNS could not resolve service name.
    Anyone have any ideas why this script fails but ONLY from ASP??
    Here is my simple script:
    dim rs, conn
    set conn = CreateObject("ADODB.Connection")
    conn.open "ora817"
    Thanks very much,
    Marc Fairorth<HR></BLOCKQUOTE>
    null

  • ODBC Connection to Oracle in ASP

    set conn = server.createobject ("adob.connection")
    conn.open "DSN", "user", "password"
    I tried using this connection string and for some reason it won't make a connect to Oracle. Is there a different string to use for 8i database driver?

    Justin-
    Our DSN both on the Microsoft Driver and the Oracle driver connect to the Oracle database. The connection string is as follows:
    set conn = server.createobject ("adodb.connection")
    conn.open "mag", "Jeff", "32348"
    set RSClient = conn.execute ("SELECT * FROM emp")
    Also, is there any Oracle documentation on using ASP for ODBC connections to Oracle8i?
    Jeff
    null

  • Oracle9i with ASP and ODBC

    i am working in a web project with ASP connecting to Oacle 9i installed on windows 2000, Pentium 4 processor on an NTFS partition.
    After installing oracle 9i, to create a new user, i was unable to logon to oracle as SYSDBA using username: system , password: manager
    having an error massage stating "ORA-01031:insufficient privileges"
    i was only able to connect as Normal
    although i set full control NTFS permissions to the whole partition.
    after creating the new user (from system, manager as normal) and giving the new user ROLES as (DBA, Connect, Resource)
    i tried to connect to oracle using ASP with ADO but the
    connection failed although i tried using Visual basic and ODBC and it worked
    so the problem now is that i can't connect to oracle in ASP
    can anyone help me?

    I'm having a bit of difficulty understanding exactly what you're saying here, so I apologize if I misunderstand...
    Are you trying to use ASP to connect to the database with the SYSDBA privilege, or are you trying to use ASP to connect to the database with a normal user? I believe you are trying to do the latter, that it is working in VB, but not in ASP. Are you getting an error when you connect via an ASP page? What error are you getting?
    Frequently, the problem is that the IIS user(s) don't have read/execute access to the %ORACLE_HOME% directory and subdirectories. I am not sure if you're indicating that you granted yourself full access or the IIS user full access to the partition.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Oracle ODBC Driver and Numbers in ASP

    When I try to retrieve a number field from my RecordSet I allways get 0, allthow when viewing the field from SQL Plus I get another value.
    objRs is an ADODB.resultSet and state is a Number(5) field.
    I've tried:
    objRs("state")
    objRs("state").value
    objRs.Fields("state")
    objRs.Fields("state").value
    but they all return 0
    null

    1) As I recall, the problem of returning 0 is caused either by an outdated version of the ODBC driver or of the MDAC (Microsoft Data Access Components). Updated versions of the ODBC driver are available here on OTN and updated versions of the MDAC are available at <http://www.microsoft.com/data>.
    2) Versioning-
    To determine the version of the Oracle8 ODBC driver you should be using, simply match up the first three digits of the ODBC driver version and the Oracle client version (see chart Mr. Oehl posted). The 8.1.5.6 ODBC driver should go on an 8.1.5.x.x system, the 8.1.6.1 ODBC driver should go on an 8.1.6.x.x system. If you have an Oracle7 client, you'll need one of the version 2.5x Oracle7 ODBC drivers.
    Any ODBC driver should connect with any Oracle database. No need to match anything up there. You can determine the version of the database you're connected to by calling the ODBC function SQLGetInfo with the InfoType SQL_DBMS_VER.
    A little elaboration on version numbers
    - Oracle versions are generally 5 digits (i.e. 8.0.5.2.4, 8.1.5.1.1). The versions that you get on CD's are generally (always?) x.x.x.0.0 versions (i.e. 8.1.5.0.0, 8.1.6.0.0). The last two digits are incremented by periodic patchkit releases <ftp://oracle-ftp.oracle.com/server/patchsets/wgt_tech/server/windowsNT/>
    - ODBC drivers must report versions in 4 parts, each part having 2 digits (i.e. 8.01.05.05). Since we're lazy about typing extra 0's, we simplify this and just refer to the 8.1.5.5 ODBC driver.
    - The 8.1.5.x ODBC driver is built with the client libraries that ship with Oracle 8.1.5.x.x, the 8.1.6.x ODBC driver is built with the client libraries that ship with Oracle 8.1.6.x.x, etc. This is why I said above that you need to match the first 3 version numbers between Oracle client and ODBC driver to determine which to use.
    I hope this is more enlightening than confusing...
    Justin Cave
    ODBC Development
    null

  • Can ASP with ODBC be used with Portal??

    I have seen many clients develop active server pages using Frontpage or Dreamweaver hitting Oracle through ODBC (also JDBC). I know you can apply FP and Dream Weaver extensions to Apache. Can this be used with Portal to prevent re-coding existing applications or to stay with their present development plans?

    Yes, you can expose any existing application environment through the portal. The fastest way to do it is to use the URL Services in the PDK to include application functionality as portlets by specifying the url. There are some restrictions with this approach. See the PDK for details. You can also code new portlets in Java that take advantage of the "External Applications Provider" capability to connect your portlets to an existing application in a single sign on way. Again, the PDK is the best source of information on this.

  • ASP connection to Oracle using MS ODBC Driver fails

    I have a Win2000 server with ORCL9.2 client and MDAC2.7 and the following code fails (last line gives the error):
    set dbConn = Server.CreateObject("ADODB.Connection")
    set rsSeq = server.CreateObject("ADODB.Recordset")
    sSql = "Select count(*) From bs_table"
    dbConn.Open "DSN=tp10;UID=aaa;PWD=aaa;"
    The error text is :
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC driver for Oracle][Oracle]Error while trying to retrieve text for error ORA-01019
    This code works fine with Oracle 8i client on the server, I really appreciate if any one can help me out here.
    Thanks

    Can you try with the Oracle ODBC driver, rather than the Microsoft ODBC driver for Oracle? Microsoft's driver still uses the old Oracle 7 OCI calls, which are no longer supported on an Oracle 9.2 client.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Need help to generate "where current of" from ODBC

    Hi
    I am trying to develop a small stand-alone program which uses Oracle Drivers.
    I have installed PERL and came up with a code (structure) like below
    But I dont know how to use the current cursor reference with a statement
    This is what I came up with
    use Win32::ODBC;
    my($db) = new Win32::ODBC("dsn=TEST_DSN; uid=TEST; pwd=TEST");
    $db->SetStmtOption(SQL_CURSOR_TYPE,SQL_CURSOR_KEYSET_DRIVEN);
    $db->SetStmtOption(SQL_ROWSET_SIZE,10);
    $db->SetCursorName("abc");
    $cursth = $db->prepare('SELECT * FROM pos_update_table testupdate where val=1 FOR UPDATE');
    $cursth->execute;
    print $db->GetCursorName;
    while ($cursth->fetch) {
    $updsth = $db->prepare("update pos_update_table set val=val+100 WHERE CURRENT OF $cursth->{CursorName}");
    $updsth->execute;
    $db->commit;
    $db->Close();
    Thanks in advance
    PS: The table has one row and the intention is to update the row using where current of clause.
    Message was edited by:
    k.venkat

    Thanks Justin for your reply.
    I am aware of I dont need a cursor for updating single row..but from one of the applications (which uses ORACLE ODBC) i get this ODBC error "no rows updated" if I hit on save button twice (from the application)
    The ODBC trace shows "where current of" clause and in the database (ORACLE 9.2) shows "update tablename set ...where rowid = "
    Now I am trying to test the ODBC and trying to generate the same Statements (with where current of)
    and fyi: PERL/WIN32:ODBC supports where current of coding-style (source: http://www.codeproject.com/books/1578700671.asp ..search for 'where current of')
    The point is I dont want to manually grab the rowid and use it for update..Instead I want the ODBC write its own statement
    Thanks
    Venkat

  • How do I get the returned cursor from a stored procedure to an asp.

    Sorry if this topic has been answered before but I am new to Oracle and ASP. I have been asked to create some stored procedures and access the results from the ASP. I will be passing one variable in and could be getting upto 200 rows returned.
    I have no trouble with the stored procedure but have no clue how to retrieve the data returned by it.

    Assuming that the stored procedure has a single argument, an OUT cursor, you should be able to do
    SQLExecDirect
    {call <stored_proc>() }
    SQLFetch
    SQLGetData
    We'll handle all the 'magic' underneath.
    Justin Cave
    ODBC Development

  • Trying to simply connect to Oracle with VBscript/ASP - and I cannot.

    This is rather embarrassing. I am pretty fluent with ASP and VBscript, and I have written many a web application connecting to Microsoft SQL Server. Now I have a need to connect to an Oracle database, and I'm beating my head against the wall.
    1) Web server is Windows Server 2003 SP1
    2) Using ASP (not ASP.NET) & VBscript
    3) I have installed the Oracle drivers on the server - it is version 10g
    4) The administrator of the Oracle database to which I want to connect has created a username and password for me to use from within my code
    5) Here is the code I am trying to run:
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.Open "Provider=MSDAORA;Data Source=XXXXXXX;User Id=YYYYYYY;Password=ZZZZZZZ;"
    That's it. 2 lines of code just trying to establish a connection. Using the user name and password provided to me by the administrator, and for Data Source I am using the IP address of the Oracle server (like I have done in the past when connecting to SQL Server). I receive the following error message when viewing this in a browser:
    Microsoft OLE DB Provider for Oracle error '80004005'
    ORA-12154: TNS:could not resolve the connect identifier specified
    Evidently, the Data Source I am using is not correct, but I was provided no other information from the admin. This is the first time any of us have tried to connect to Oracle using ASP/VBScript, so the administrator isn't sure what I need to do ... any help would be so appreciated.

    Hello,
    I got mine to work by setting up an ODBC System DSN and connecting to it. I think this bypasses the Microsoft driver, which might be what's causing the problem.
    Set Db = Server.CreateObject("ADODB.Connection")
    Db.Open "DSN=TEST;User ID=userid;Password=password;"
    Good luck, I've found it requires a lot of persistence...
    Al
    Springfield, MO

  • ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in windows server 2008 r2

    ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in windows server 2008 r2.I made a application in asp.net c#.I am using ODBC connection.When I deployed my application in windows server2008 r2.There
    is no Microsoft ODBC driver shown in ODBC Data source administrator.Then I go to the C:\Windows\SysWOW64 and open  Odbcad32.exe and add Microsoft ODBC2 driver for Oracle and when I run my application I got following error
    ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    I am using follwoing string
     <connectionStrings>
    <add name="theconnetion" connectionString="DSN=abdb;UID=abc;PWD=xyz"/>
     </connectionStrings>
    Guide me What I do?

    Did you add a System DSN or a User DSN? If you added a User DSN from your own login, the asp.net application will not be able to use it unless its application Pool in IIS is configured to run under the same credentials that you used for creating
    the DSN. It's better if you add a System DSN.
    Also, be careful to ensure that you are using a 64 bit DSN, unless you configure the application to run in 32 bits. If the 64 bit application attempts to use the 32 bit driver you get the same error message "Data source name not found and no default
    driver specified". See this KB article:
    http://support.microsoft.com/kb/942976/en-us

Maybe you are looking for

  • Error While Creating Namespace

    Hi Experts, I Imported .TPZ File In to Our Newly Installed PI 7.0 server. when I am Trying to Create a New Name space Under this Imported Objects. It's Giving the Error Like <b>You cannot create new objects since the system is not the original system

  • The cost of billing document is not the same as GI cost

    Dear Expert, Condition EK02 in the billing document is not picking up the Cost of Goods sold at the time of goods issue. We have a Made-to-Order Sales Order with a production order. The cost condition EK02 on the billing document is picking up the EK

  • Mac Book Pro video out (no signal to tv)

    My six month old Mac Book Pro has been working fine sending out a video and audio signal since day one. Two days ago I now get no video signal out of the same video adapter and I also don't get an audio signal out of the speakers nor out of the ear p

  • Combine IDoc and RFC Respone in one Message Type

    Hello, I need to have the possibility to store the data of one IDoc and one RFC Response in one Message Type. The structure should be something like this: IDoc_AND_RFC_RESPONSE (root) --item (0..onbounded) ID (Attribute, type xsd:string) IDOC (Elemte

  • Replacement Path - Variables

    Dear Experts, I am new to Bi(experienced in ABAP), so please do explain in Laymans language. I have already gone through Help and SAP PDF Documents. 1. Can anyone explain me the Replacement Path Clearly with very simple exmaple. Regards BI Learner.