General [message #233725] |
Fri, 27 April 2007 04:26 |
anilkulkarni
Messages: 22 Registered: April 2005
|
Junior Member |
|
|
I am getting the following error when i am
trying to open a connection.
[Microsoft][ODBC driver for Oracle][Oracle]ORA-00604"
error occured at recursive SQL level %s
following is the code from which I am getting the disconnected recordset.
Public Function getRecordset(ByVal strStmt As String) As ADODB.Recordset
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strConn As String
strConn = "Driver=Microsoft ODBC for Oracle;Server=" & dbServer & ";UID=" & dbUserName & ";PWD=" & dbPassword & ";"
cn.Open strConn, dbUserName, dbPassword
rs.CursorLocation = adUseClient
rs.Open strStmt, cn, adOpenForwardOnly, adLockReadOnly
Set rs.ActiveConnection = Nothing
cn.Close
Set getRecordset = rs
Exit Function
End Function
I am not able to understand where the problem is
please help me out on this.
Thanks in advance
Anil Kulkarni
|
|
|
|
Re: General [message #233736 is a reply to message #233726] |
Fri, 27 April 2007 04:37 |
anilkulkarni
Messages: 22 Registered: April 2005
|
Junior Member |
|
|
The error is coming at the following line
cn.Open strConn, dbUserName, dbPassword
No other error message is displayed.
|
|
|
|
|
Re: General [message #233888 is a reply to message #233768] |
Fri, 27 April 2007 23:50 |
anilkulkarni
Messages: 22 Registered: April 2005
|
Junior Member |
|
|
I am reading those parameters (username,password and hostname) from the INI file.
more over i am able to connect thru the SQL Plus but not thru the application.
I have stopped the database on the server and restarted the services of the database then it is working fine.
can you please let me know what should i do if without restarting the database services on the server.
|
|
|
|
|
|
Re: General [message #236803 is a reply to message #236790] |
Fri, 11 May 2007 01:11 |
anilkulkarni
Messages: 22 Registered: April 2005
|
Junior Member |
|
|
I am getting the following error when i am
trying to open a connection.
[Microsoft][ODBC driver for Oracle][Oracle]ORA-00604"
error occured at recursive SQL level %s
following is the code from which I am getting the disconnected recordset.
Public Function getRecordset(ByVal strStmt As String) As ADODB.Recordset
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strConn As String
strConn = "Driver=Microsoft ODBC for Oracle;Server=" & dbServer & ";UID=" & dbUserName & ";PWD=" & dbPassword & ";"
cn.Open strConn, dbUserName, dbPassword
rs.CursorLocation = adUseClient
rs.Open strStmt, cn, adOpenForwardOnly, adLockReadOnly
Set rs.ActiveConnection = Nothing
cn.Close
Set getRecordset = rs
Exit Function
End Function
If i restart the database services then it is working fine but we can restart the services on the server every day.
I am getting this problem daily, please help me to solve the same
|
|
|
Re: General [message #236826 is a reply to message #236803] |
Fri, 11 May 2007 01:46 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Which part of my previous post is unclear? Please respond to each paragraph, in order and in a separate paragraph.
I saw your code in your first post, you don't have to post it again. Also, as it IS code please put 'code' tags around it.
David
Upd: Typo.
[Updated on: Fri, 11 May 2007 01:47] Report message to a moderator
|
|
|
Re: General [message #236835 is a reply to message #236826] |
Fri, 11 May 2007 02:02 |
anilkulkarni
Messages: 22 Registered: April 2005
|
Junior Member |
|
|
I am able to connect thru the SQL*plus.
The error is coming at the following line
"cn.Open strConn, dbUserName, dbPassword"
Thanks in advance.
|
|
|
|
Re: General [message #236845 is a reply to message #236840] |
Fri, 11 May 2007 02:27 |
anilkulkarni
Messages: 22 Registered: April 2005
|
Junior Member |
|
|
See the following code
strConn = "Driver=Microsoft ODBC for Oracle;Server=" & dbServer & ";UID=" & dbUserName & ";PWD=" & dbPassword & ";"
cn.Open strConn, dbUserName, dbPassword
Thanks in advance
|
|
|
|
Re: General [message #236852 is a reply to message #236848] |
Fri, 11 May 2007 02:42 |
anilkulkarni
Messages: 22 Registered: April 2005
|
Junior Member |
|
|
See the following code
strConn = "Driver=Microsoft ODBC for Oracle;"
strConn = strConn & "Server=" & dbServer & ";"
strConn = strConn & "UID=" & dbUserName & ";"
strConn = strConn & "PWD=" & dbPassword & ";"
cn.Open strConn, dbUserName, dbPassword
Thanks in advance
|
|
|
Re: General [message #237263 is a reply to message #236852] |
Mon, 14 May 2007 00:31 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
What I am looking for is a statement that will display the contents of 'strConn' on the screen.
For example, in Forms..
..
..
strConn = 'Driver=Microsoft ODBC for Oracle';
message('strConn=>'||strConn||'<');
pause;
..
.. will display "strConn=>Driver=Microsoft ODBC for Oracle<" in the message area.
Can you write something like this in your code please?
David
|
|
|