SQL Server 2005 64BIT Linked Server Cannot fetch a row using a bookmark

We get the following error SOMETIMES when trying to delete a row from an Oracle 10g database table via the SQL 2005 64BIT linked server.
DELETE [edwdev]..SYSTEM.SAIC_ARTIFACT_LOG FROM tblArtifactLog src WHERE src.source_seq_no = SAIC_ARTIFACT_LOG.art_seq_no and src.source_name = 'edwdev' [SQLSTATE 01000] (Message 0) Cannot fetch a row using a bookmark from OLE DB provider "OraOLEDB.Oracle" for linked server "edwdev". [SQLSTATE 42000] (Error 7333). The step failed.
They keyword here is SOMETIMES. The job would fail 100% of the time before applying ODAC 10.2.0.3.0, after the ODAC install the job fails about 40% of the time. We have this setup in a test enviornment and yes there are rows of data in the table everytime the job runs.
As far as the OraOLEDB10.dll install we have a date of 2/20/07 but a version of 10.2.0.2. I am wondering if this shouldn't be a new version.

LearnMoreAgile wrote:
so does that mean no one at oracle can guide me in this issue before i goto microsoft ?How has the Linked Server been created in MSSQL? OraOLEDb.Oracle is the class name for the Oracle OLEDB provider which should appear in your list of OLEDB providers in your favourite windows dev tool or when creating the linked server. If it doesn't appear likely you didn't choose to install it. I don't know if it's a default install with the 64bit client, but the ODAC client contains the .net provider and not the OLEDB provider.
Niall

Similar Messages

  • Problem "The OLE DB provider for linked server reported an error. The provider reported an unexpected catastrophic failure Cannot fetch a row from OLE DB provider for linked server"

    hi
      i'd like to ask question about linked server.
      my linked server used to work but now when i try to select from linked server i was told "The OLE DB provider for linked server reported an error. The provider reported an unexpected catastrophic failure Cannot fetch a row from OLE DB provider
    for linked server"
      but in fact for test connection i was told "the test connection to the linked server succeeded".
      could  anyone help me? thank u very much
    best regards
    martin

    Hi, 
    In addition to Tracy's post we have to know those answers as well:
    * what provider are you using for the connection
    * what do you connect to
    for example, if someone try to connect to oracle using sql server provider then several simple queries are going to work probably OK, but once you are trying to use T-SQL or any complex SQL query then the errors are starting.
    please post the connection string (without the password!) + the query that you are trying to use.
    [Personal Site] [Blog] [Facebook]

  • Why ? installing SolMan 7.0 MS SQL server cannot get info about acct sidadm

    While installing SolMan on Windows 2003 SQL 2005  64bit OS the install stops and will not continue
    with the following error
    NOTE: I am installing on 64bit OS as we already have on 32bit OS and need to migrate it over to 64bit
    MS SQL server cannot get informatin about account cityacct\sidadm 
    the log recommends to execute the following command in SQL
    master..xp_logininfo 'CITYACCT\sidadm'
    I get the error
    Could not obtain information about Windows NT group/user ''CITYACCT\sidadm' error code 0x5
    I am soooo stuck , I have been researching and researching even with SAP and no answer yet, has anyone had this issue and how can I get past it?
    Thank You in Advance
    Maria
    I

    Maria,
    Were you able to resolve this issue? I'm getting the same error.
    -wael

  • SQL Server cannot authenticate using Kerberos because the Service Principal Name (SPN) is missing, misplaced, or duplicated

    We are getting this below alert message, while using SCOM 2012 R2.  Anybody have any idea how to resolve this on the SQL box ?
    Thx...
    SQL Server cannot authenticate using Kerberos because the Service Principal Name (SPN) is missing, misplaced, or duplicated.
    Service Account: NT Service\MSSQL$SQLEXPRESS
    Missing SPNs:
    Misplaced SPNs: MSSQLSvc/mysqlbox.com:SQLEXPRESS - sqldbadmin
    Duplicate SPNs:

    To Fix this issue, You can check below links
    http://support.microsoft.com/kb/2443457/EN-US
    http://www.scomgod.com/?p=155
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"Mai Ali | My blog:
    Technical | Twitter:
    Mai Ali

  • SQL Server cannot Find SSL Certificate

    We need help solve an issue we are having with SQL Server 2008 recognizing certificates (for supporting SSL communications) we generate through the MakeCert.exe utility. We have followed all instructions available in the MSDN SQL Server 2008 online books, including using the mmc console utility to verify that the certificates are valid, but the certificates we make fail to be seen by the SQL Server 2008 Configuration Management application.

    Hi,
    I’m not sure what instructions you read from MSDN. Do you follow the steps described in http://msdn.microsoft.com/en-us/library/ms191192.aspx?  If not, please try it. Additionally, I suggest you refer to the following content from MSDN:
    For SQL Server to load a SSL certificate, the certificate must meet the following conditions:
    1. The certificate must be in either the local computer certificate store or the current user certificate store.
    2. The current system time must be after the Valid from property of the certificate and before the Valid to property of the certificate.
    3. The certificate must be meant for server authentication. This requires the Enhanced Key Usage property of the certificate to specify Server Authentication (1.3.6.1.5.5.7.3.1).
    4. The certificate must be created by using the KeySpec option of AT_KEYEXCHANGE. Usually, the certificate's key usage property (KEY_USAGE) will also include key encipherment (CERT_KEY_ENCIPHERMENT_KEY_USAGE).
    5. The Subject property of the certificate must indicate that the common name (CN) is the same as the host name or fully qualified domain name (FQDN) of the server computer. If SQL Server is running on a failover cluster, the common name must match the host name or FQDN of the virtual server and the certificates must be provisioned on all nodes in the failover cluster.
    If there are any more questions, please let me know.
    Thanks.
    ***Xiao Min Tan***Microsoft Online Community***

  • HT5704 after updating to ios 6.1.3 seems my factory unlocked 3gs is not working, i cant even restore..the message displayed is "itunes software update server cannot be contacted" 'm using latest itunes with winows xp system...........please please help me

    after updating to ios 6.1.3 seems my factory unlocked 3gs is not working, i cant even restore..the message displayed is "itunes software update server cannot be contacted" 'm using latest itunes with winows xp system...........please please help me

    There is no such thing as a "Factory Unlocked iPhone "
    They are either locked to a carrier who may at some stage offer unlocking
    or sold direct to a user by Apple (from their own Stores or online .)
    Those iPhones are NOT locked
    Where did you get your iPhone
    If from Apple try this
    http://support.apple.com/kb/HT1808

  • Installing SQL Server 2012 remotely via Powershell using Invoke-Command

    I am trying to perform a SQL Server 2012 command line installation using Powershell Invoke-Command on Windows 2012 Datacenter.
    The code I am using is as follows:
     $ret = Invoke-Command -ComputerName $COMPUTER -ArgumentList $MEDIA,$ACTION,$FEATURES,$INSTALLDIR,$INSTANCEID,$INSTANCENAME,$SQLDATADRIVE,$SQLLOGDRIVE,$DOMAIN,$SQLSERVERSERVICEUSER,$SQLSERVICEPASSWORD,$PRODUCTKEY,$SQLSERVERSA,$username,$ADMINPASSWD
    -Credential $cred -ScriptBlock {
      param($MEDIA,
         $ACTION,
         $FEATURES,
         $INSTALLDIR,
         $INSTANCEID,
         $INSTANCENAME,
         $SQLDATADRIVE,
         $SQLLOGDRIVE,
         $DOMAIN,
         $SQLSERVERSERVICEUSER,
         $SQLSERVICEPASSWORD,
         $PRODUCTKEY,
         $SQLSERVERSA,
         $USERNAME,
         $PASSWD)
      Set-Location $MEDIA
      Import-Module ServerManager
      if (-not [IO.Directory]::Exists($MEDIA)){
       $hn = hostname
       return 0,"Failed to find SQL Server Installer at $MEDIA on $hn"
      $tran = ""
      Try{
       & $MEDIA\setup.exe /ACTION=$ACTION /Q /FEATURES=$FEATURES /IACCEPTSQLSERVERLICENSETERMS /UPDATEENABLED=False /INSTALLSHAREDDIR="$INSTALLDIR\Program Files\Microsoft SQL Server" /INSTALLSHAREDWOWDIR="$INSTALLDIR\Program Files
    (x86)\Microsoft SQL Server" /RSINSTALLMODE="FilesOnlyMode" /INSTANCEID="$INSTANCEID" /INSTANCENAME="$INSTANCENAME" /INSTANCEDIR="$INSTALLDIR\Program Files\Microsoft SQL Server" /ENU="True" /AGTSVCSTARTUPTYPE="Automatic"
    /SQLSVCSTARTUPTYPE="Automatic" /NPENABLED=1 /TCPENABLED=1 /RSSVCStartupType="Automatic" /ERRORREPORTING=0 /SQMREPORTING=0 /INDICATEPROGRESS /INSTALLSQLDATADIR="$SQLDATADRIVE\DATA" /SQLUSERDBDIR="$SQLDATADRIVE\DATA" /SQLUSERDBLOGDIR="$SQLLOGDRIVE\LOG"
    /ASDATADIR="$SQLDATADRIVE\OLAP\DATA" /ASLOGDIR="$SQLLOGDRIVE\OLAP\Log" \ASBACKUPDIR="$SQLDATADRIVE\OLAP\Backup" \ASTEMPDIR="$SQLDATADRIVE\OLAP\Temp" /ASCONFIGDIR="$SQLDATADRIVE\OLAP\Config" /ASCOLLATION="Latin1_General_CI_AS"
    /SQLCOLLATION="SQL_Latin1_General_CP1_CS_AS" /SQLSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /SQLSVCPASSWORD="$SQLSERVICEPASSWORD" /AGTSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /AGTSVCPASSWORD="$SQLSERVICEPASSWORD"
    /ASSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /ASSVCPASSWORD="$SQLSERVICEPASSWORD" /RSSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /RSSVCPASSWORD="$SQLSERVICEPASSWORD" /FTSVCACCOUNT="NT AUTHORITY\LOCAL SERVICE"
    /INDICATEPROGRESS > $out
      } Catch [System.Exception] {
       return 0,$_.Exception.ToString()
      if ($tran -ne ""){
       $out += $tran
      return 1,$out
    The media resides on the server that I am remoting to in powershell and the server is on the same domain. The credentials I pass are for a Domain Admin, but SQL Server fails to validate the credentials for the passed parameter for the sql service user with
    a Access Denied.
    If I run the same command with the same user directly on the server it works fine.
    My guess is that the elavated privs for Administrator are not being set when using Invoke-Command? Is there a way to utilize powershell to install SQL Server 2012 with command line option using the invoke-command and passing credentials? Or is this a limitation
    to the SQL Server installer. If there is can a example be provided?

    Ok, so with the help of some friends, we found a fix that works!
    Prior to running the Invoke-Command I now run:
    # enable CredSSP on a client computer; this command allows the client credentials to be delegated to the server01 computer.:
    Enable-WsManCredSSP -Role Client -DelefateComputer server.some.domain.com
    Then I add the -Authentication option to my Invoke-Command with option Credssp.
    The install the works fine. Hope this helpes all.

  • Cannot fetch a row from OLE DB provider "BULK" with bulk insert task

    Hi, folks:
    I created a simple SSIS package. On the Control Flow, I created a Bulk INsert Task with Destination connection to a the local SQL server, a csv file from a local folder, specify comma delimiter. Then I excute the task and I got this long error message.
    [Bulk Insert Task] Error: An error occurred with the following error message: "Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.The bulk load failed. The column is too long in the data file for row 1, column 1. Verify that the field terminator and row terminator are specified correctly.".

    I got the same error with some additional error details (below).  All I had to do to fix the problem was set the Timeout property for the SQL Server Destination = 0
    I was using the following components:
    SQL Server 2008
    SQL Server Integration Services 10.0
    Data Flow Task
    OLE DB Source – connecting to Oracle 11i
    SQL Server Destination – connecting to the local SQL Server 2008 instance
    Full Error Message:
    Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E14.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E14  Description: "Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E14  Description: "The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E14  Description: "The Bulk Insert operation of SQL Server Destination has timed out. Please consider increasing the value of Timeout property on the SQL Server Destination in the dataflow.".
    For SQL Server 2005 there is a hot fix available from Microsoft at http://support.microsoft.com/default.aspx/kb/937545

  • Importing Data from MS Access into SQL Serevr 2005 via Linked Server: User-Dependent failure

    I am operating an Express version of SQL Server 2005 on a Windows XP machine.
    I have successfully setup a linked server to a remote Access (.mdb) database. With my user account (Windows authentication) I can retrieve and store data without any problem.
    I have another user (apparently with same settings as my own account) that is always failing to get the data.
    The Error message he gets is:
    OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "TSU_Tmp" returned message "The Microsoft Jet database engine cannot open the file '\\DSITSO-NT0001\Exchange\Database5.mdb'.  It is already opened exclusively by another
    user, or you need permission to view its data.".
    Msg 7303, Level 16, State 1, Line 1
    Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "TSU_Tmp".
    Here below the code used to set up the linked server (coming from the Code Snippets of SQL Server 2005).
    EXEC sp_addlinkedserver
    @server = N'TSU_Tmp',
    @provider = N'Microsoft.Jet.OLEDB.4.0',
    @srvproduct = N'OLE DB Provider for Jet',
    @datasrc = N'\\DSITSO-NT0001\Exchange\Database5.mdb'
    EXEC sp_addlinkedsrvlogin
    @rmtsrvname = N'TSU_Tmp',
    @useself = N'TRUE',
    @locallogin = NULL,
    @rmtuser = N'Admin',
    @rmtpassword = NULL
    We both run the script, actually is a Stored Procedure, (see code below) on the same XP machine where SQL Server is running.
    EXEC('INSERT INTO tblFcst
    (StartBUCode, StartBUType, StartBUSeq, StartTrz, StartCty,
    EndBUCode, EndBUType, EndBUSeq, EndTrz, EndCty,
    FcstCreationPeriod, FcstValidForPeriod, Fcst, FcstExternalReference,
    IsProcessed, IsSolved)
    SELECT TSU.BUCodeSend, TSU.BUTypeSend, TSU.BuaNoSend, Null AS StartTrz, Null AS StartCty,
    TSU.BUCodeRcv, TSU.BUTypeRcv, TSU.BuaNoRcv, Null AS EndTrz, Null AS EndCty,
    TSU.[Current week], TSU.[Forecast for week], TSU.[Volume trp m3], TSU.[TSU_ID (Don''t touch me)],
    0 AS IsProcessed, 0 AS IsSolved
    FROM TSU_Tmp...tbl_TSU_trpm3 AS TSU;')
    PS: it is run using an 'EXEC(String)' format as at compile time of Store Procedure the Linked Server is not existing and otherwise compile would fail.
    We tried it with different files, in different locations. It always wors for me, never for him...
    The files were not used by anyone else. The folder(s) where they were stored are open to "Everyone".
    So I concluded it should be something linked to the User... :) But I really do not know what, as said apparently we have exactely the same setup in our Login profiles.
    Any idea or suggestion is welcome.
    Thanks
    Luca

    Hi Luca Lentati,
    According to your description and T-SQL statement, we need to verify if the download and install the Microsoft.Jet.OleDB.4.0 as a provider.
     If the 64bit SQL Server is running on the server,  The error, the Microsoft.Jet.OleDB.4.0 is not support, I reommend you download and install the Microsoft.ACE.OLEDB.12.0 as a provider.
    The error 7303 message indicates that the linked server does not have correct login mapping. You can execute the sp_helplinkedsrvlogin stored procedure to set the login information correctly. Also, verify that you have specified the correct parameters
    for the linked server configuration.
    In addition, if the issue still exists, I recommend you copy the access file to local Server, and create linked server between them , check if it can run well. If yes, it means that
     the account which SQL server uses to run the service does not have read/write access to that file share.
    There is an article about configuring a Linked Microsoft Access Server on SQL 2005 Server , you can review the following article.
    http://www.aspfree.com/c/a/Microsoft-Access/Configuring-a-Linked-Microsoft-Access-Server-on-SQL-2005-Server/
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • SQL SERVER BULK FETCH AND INSERT/UPDATE?

    Hi All,
           I am currently working with C and SQL Server 2012. My requirement is to Bulk fetch the records and Insert/Update the same in the other table with some  business logic?
           How do i do this?
           Thanks in Advance.
    Regards
    Yogesh.B

    > is there a possibility that I can do a bulk fetch and place it in an array, even inside a stored procedure ?
    You can use Temporary tables or Table variables and have them indexes as well
    >After I have processed my records, tell me a way that I will NOT go, RECORD by RECORD basis, even inside a stored procedure ?
    As i said earlier, you can perform UPDATE these temporary tables or table variables and finally INSERT/ UPDATE your base table
    >Arrays are used just to minimize the traffic between the server and the program area. They are used for efficient processing.
    In your case you will first have to populate the array (Using some of your queries from the server) which means you will first load the arrary, do some updates, and then send them back to server therefore
    network engagement
    So I just gave you some thoughts I feel could be useful for your implementation, like we say, there are many ways so pick the one that works good for you in the long run with good scalability
    Good Luck! Please Mark This As Answer if it solved your issue. Please Vote This As Helpful if it helps to solve your issue

  • SQL Server - cannot open table

    Hi all - has anyone experienced this problem? Using SQL
    Server 2000 and CF5.
    We run reporting queries on one table in the database which
    link to another database server (using
    'servername.dbname.dbo.tablename/viewname' in the queries to refer
    to the linked server).
    This has been working successfully, but on several occasions
    the table refuses to open in Enterprise Manager - it just gives a
    blank set of rows with a blinking cursor. The application then
    stops working.
    Thanks for any advice
    Rog

    The default for SQL 2000 is READ COMMITTED. This prevents
    dirty reads, but has the performance hit of waiting for locked
    pages. READ UNCOMMITTED, the lowest level of isolation, returns
    data regardless of the lock state. It depends, if you're willing to
    trade performance for accuracy. In the case of data that is not
    changed often, READ UNCOMMITTED can increase query performance.
    Read SQL BOL for more info on the isolation levels.
    HTH,

  • SQL Query Works in MS SQL Server 2008 but not when using Database Toolkit

    I have this SQL query:
    DECLARE @DataTypeTable TABLE (
    Name varchar(128),
    TypeID INT)
    --Add comma delimeted data type names to temp table
    INSERT INTO @DataTypeTable (Name)
    SELECT * FROM WhatWeShouldDoRead.func_Split(@DataTypeTrimmed,',')
    SELECT Name FROM @DataTypeTable
    Which takes a comma delimited string and returns the string as a table.  It works correctly in Microsoft SQL Server Management Studio.  When I run this as a stored procedure  I get back nothing.  There are no errors, SQL or otherwise.  I've verified that I am connected to the correct database and that the stored procedure is loaded by changing the no error string that is reported from this stored procedure (that code is not shown in the above example).  Has anyone seen this problem before, or have any experiance with SQL/Labview interfaces to tell me what I'm doing wrong?
    Thanks in advance. 
    Solved!
    Go to Solution.

    After doing some more research it appears that the database toolkit cannot interface with any table results from any type of temp table.  It may have to do with the fact that MS SQL 2008 stores temp tables in a seperate database (tempdb) and not the database you are currently connected to.  See this link for a good artical on temp tables:
    http://databases.aspfaq.com/database/should-i-use-a-temp-table-or-a-table-variable.html
    If possible,  I'd like a someone to prove me wrong, but for now will have to settle for exporting the contents of a temp table through a string.

  • Which version of SQL Server 2014 should I be using?

    Hello,
    I'm writing a Visual Basic.NET application for a school network. I am new to databases and made the assumption that I need Microsoft SQL Server (I've gone for the express edition). My plan is to run a copy on the school's server and connect to it through
    several instances of my program, each on their own computer on the school network. The server is 64bit so I know I should be getting the 64bit edition. However, I'm not sure whether I should choose LocalDB, Express, Express with Tools, Management Studio Express
    or any of the other versions.
    Which one should I choose?

    Hi 08robertsj,
    Based on your description, you can install SQL Server 2014 Express with Tools (SQLEXPRWT _x64_ENU.exe)
     or SQL Server 2014 Express with Advanced Services (SQLEXPRADV_x64_ENU.exe) on the 64-bit server.
    SQLEXPRWT _x64_ENU.exe package contains everything needed to install and configure SQL Server as a database server including the full version of SQL Server 2014 Management Studio. SQLEXPRADV_x64_ENU.exe package is a larger download than “with Tools,” as it
    also includes both Full Text Search and Reporting Services.
    LocalDB is meant for developers, with it you can simply create and work with databases from code. Express edition includes the SQL Server database engine only. SQL Server Management Studio Express doesn’t not contain the database, but only the tools to manage
    SQL Server instances.
    For more details about the difference between Express editions, please review the following link.
    http://msdn.microsoft.com/en-us/evalcenter/dn434042.aspx
    Thanks,
    Lydia Zhang

  • Import Oracle DataBase dump file Into Sql Server With out connection oracle using c# code.

    Hi All,
    I would like to ask how can imports my dump oracle database file data and struct into sql server 2005
    with out make connection oracle.
    best regards.
    Hakim. 

    Hi Hakim.
    Based on your title, what I understood there is a issue regarding transfer oracle db dump to sql database using C# code. Am I right? If so, I am afraid there is no build-in method which meet your requrements in .NET framework. You must provides
    OraDump  Export API to allow developers integrate corresponding capabilities  into their applications. These capabilities are about export data from  Oracle dump files into popular databases like Microsoft SQL server. Every developer
    having OraDump Export API can write just few lines of code on C# or  Visual Basic to implement the appropriate export process.
    I am search a third-party link, but it's a paid service. 
    http://www.convert-in.com/data-migration-service.htm
    If you don't have to with code, Please refer to: Migrating Oracle Databases to SQL Server 2000
    http://technet.microsoft.com/en-us/library/cc966513.aspx
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • MS SQL Server/VB6 to Oracle 8i using OBDC

    OMW,
    I presently connect to MS SQL in Visual Basic 6.0 using ODBC. I
    would like to connect to Oracle in the same manner. Does the OMW
    do this, and if so are there any things I should know before
    attempting to use it in this application? I have purchased and
    installed a trial version of Oracle 8i, but I am experiencing
    some slight difficulties in the way Oracle handles Resultsets
    (RDO Components) compared to MS SQL.
    thanks
    g
    null

    Gary,
    There is some information in the faq (reproduced below), showing
    how the application may not need to be changed.
    Some of the functionality provided by the intersolve driver is
    now available in the oracle 8.1.5.3 odbc driver.
    Turloch
    Oracle Migration Workbench team
    from the faq (shipped with the workbench):
    How are result sets/dynasets returned to the calling program?
    The Oracle Migration Workbench parser adds an extra argument
    of type REF CURSOR for result sets/dynasets. This type is
    understood and can be
    manipulated by both PL/SQL and Oracle JDBC. Oracle8 release
    8.0.5 ODBC drivers support REF CURSORs which means that the
    additional argument must
    be explicitly handled by the application, and the client
    application code must be changed. However, some third-party
    vendors such as Intersolv supply ODBC
    drivers for Oracle that support REF CURSORs and can, in
    addition, implicitly make use of REF CURSORs for using result
    sets/dynasets. Therefore, no
    change is required in the client application code. This is
    illustrated in the following examples of an MS SQL Server stored
    procedure and its equivalent Oracle
    package and stored procedure as generated by the Oracle
    Migration Workbench parser.
    MS SQL Server Stored Procedure
    CREATE PROCEDURE byroyalty
    AS
    select au_id from titleauthor
    GO
    Oracle8i Package and Stored Procedure
    PACKAGE BYROYALTYPkg AS
    TYPE RT1 IS RECORD (
    au_id titleauthor.au_id%TYPE
    TYPE RCT1 IS REF CURSOR RETURN RT1;
    END;
    PROCEDURE byroyalty(
    RC1 IN OUT byroyaltyPkg.RCT1)
    AS
    StoO_selcnt INTEGER;
    StoO_error INTEGER;
    StoO_rowcnt INTEGER;
    StoO_errmsg VARCHAR2(255);
    StoO_sqlstatus INTEGER;
    BEGIN
    OPEN RC1 FOR
    SELECT au_id FROM titleauthor;
    END byroyalty;
    The following example illustrates the typical ODBC code used
    by Intersolv to call the above MS SQL Server stored procedure.
    This code also works for the
    above Oracle8i package and stored procedure. Note that error
    handling must be added in a real application:
    SQLPrepare(...,'{call byroyalty()}',...)
    SQLExecute()
    SQLBindCol()
    SQLFetch()
    Comments:
    SQLPrepare(...,'{call byroyalty()}',...) is the ODBC SQL
    syntax used to execute stored procedures.
    SQLExecute()executes the stored procedure.
    SQLBindCol()assigns storage for result column 1 in the
    result set (au_id).
    SQLFetch() fetches the first record from the result set
    generated by the stored procedure.
    The following examples illustrate how to call the above MS
    SQL Server stored procedure with result sets/dynasets in Visual
    Basic using DAO and RDO on
    top of ODBC. This code works for Oracle8i packages and
    stored procedures if you use an Intersolv ODBC driver to
    understand Oracle REF CURSORs.
    DAO
    Private Sub Command2_Click()
    Dim sSql As String
    sSql = "{call byroyalty()}"
    'In Oracle ODBC driver use refcusor argument to get
    result set
    Set rCustomers = dbsServer.OpenRecordset(sSql,
    dbOpenDynamic)
    Text4 = rCustomers.Fields(0)
    theend:
    End Sub
    Please note, this example assumes that a DAO connection has
    been set up already.
    RDO
    Private Sub Command1_Click()
    StrSql = "{call byroyalty}"
    'in oracle odbc driver uses refcusor argument to get
    result set
    Set Ps = connx1.CreatePreparedStatement("PsTest",
    StrSql)
    Set Rs = Ps.OpenResultSet(rdOpenStatic
    Text3 = Rs!au_id
    Rs.Close
    End Sub
    Please note, this example assumes that an RDO connection has
    been set up already.
    Gary (guest) wrote:
    : OMW,
    : I presently connect to MS SQL in Visual Basic 6.0 using ODBC. I
    : would like to connect to Oracle in the same manner. Does the
    OMW
    : do this, and if so are there any things I should know before
    : attempting to use it in this application? I have purchased and
    : installed a trial version of Oracle 8i, but I am experiencing
    : some slight difficulties in the way Oracle handles Resultsets
    : (RDO Components) compared to MS SQL.
    : thanks
    : g
    Oracle Technology Network
    http://technet.oracle.com
    null

Maybe you are looking for