Error in Select Statement

0 pts.
Tags:
Billing and customer care
Billing Support Systems
Career Development
Data analysis
Database
DB2
Development
Lifecycle development
Oracle
Project management
I have connected VB to ORACLE by ADODB connection. When I am trying to access data from different schema it?s showing an error message ?[Oracle] [ODBC] [Ora] ORA-01013: User requested cancel of current operation? If I am querying by specifying the data in the field it?s not giving any error. The function I used for connection is Public Function ConnectToDb() Set cn = New ADODB.Connection With cn .ConnectionString = "provider = MSDASQL;DSN=DsnName;USR=UserID;PWD=Password" .Open End With Exit Function The function I used for selection is Public Function ExecuteSelect(query As String) As ADODB.Recordset Dim Rs As New ADODB.Recordset Rs.CursorLocation = adUseClient Rs.Open query, cn Set ExecuteSelect = Rs End Function Your attention and response to this email is appreciated.
ASKED: March 27, 2006  10:31 AM
UPDATED: April 3, 2006  8:06 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I do not have any ORACLE experience, but I have seen this with SQL Server 2000. It is usually a time-out error, and changing the connection string timeout has solved it in the past.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • A09969
    I agree it is probably a timeout issue. You can set the timeout in the web.xml (use standard html tags - substituted parenthesis to comply with 'whatis' rules): (session-config) (session-timeout)480(/session-timeout) (/session-config) If this is a company standard timeout, exceptions may have to be pointed to new original URL to pick up the different setting.
    0 pointsBadges:
    report
  • Rloveall
    You say you're connecting to two different schema's but show only one connection. What is the code for the second connection? and what's the Select statement? You state it works when specifing the data for the fields, can you be more specific?
    0 pointsBadges:
    report
  • A09969
    Don't know if you're still having problems or not. Here are a couple more thoughts. 1) to be tidy you should set your recordset to nothing after using it: Set ExecuteSelect = Rs Set Rs = Nothing End Function 2) This is from another web site: Use a SQL Pass Through query instead. You would use Oracle syntax in it and send it to the server where the whole thing is processed and only the result are returned. The results are read only though. I (someone else) used one for a huge delete query. The time it took for Access to do it was over 8 hours. Oracle did it in less than 5 minutes. Network communication was the problem. If the data had been local to Access, it would have been extremely fast too. In fact Access is probably faster than Oracle or SQL Server in many respects when the file is local.
    0 pointsBadges:
    report
  • DaveInAZ
    What is the actual SQL statement you're trying to execute? ORA-01013 is usually not the real problem. If the ORA-01013 error is preceded by any other error, then it is probably the preceding error that needs to be investigated. This bit is a quote--- Timeouts are a frequent cause of ORA-01013. This can be difficult to identify because a timeout may not be explicitly reported as part of the error. The Oracle 8 ODBC driver implements a timeout, the previous Oracle 7 ODBC driver did not. SQL*Net also implements a timeout. This is specified via the 'sqlnet.expire_time' parameter in the 'sqlnet.ora' file. ---- You might also want to take a look at http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:704225010478
    0 pointsBadges:
    report
  • Mortree
    Could it be simple syntax? SQL on Oracle and MSSQL or Access is not always precisely the same. The statement that works may just be the case where the syntax is the same.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following