I want to create a procedure in ASP.NET to run the "SET DEFINE OFF" command
in an Oracle database. I tried the following:
Public Shared Sub SetDefineOff()
Dim myconnection As New
OracleConnectio n(Configuration Settings.AppSet tings("connecti onstring"))
Dim cmdsetdefineoff As New OracleCommand(" SET DEFINE OFF", myconnection)
myconnection.Op en()
cmdsetdefineoff .ExecuteNonQuer y()
myconnection.Cl ose()
End Sub
But I recieve the following error:
Server Error in '/lvbeporgtest' Application.
--------------------------------------------------------------------------------
ORA-00922: missing or invalid option
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Data.Ora cleClient.Oracl eException: ORA-00922:
missing or invalid option
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:
[OracleException : ORA-00922: missing or invalid option
]
System.Data.Ora cleClient.Oracl eConnection.Che ckError(OciErro rHandle
errorHandle, Int32 rc) +174
System.Data.Ora cleClient.Oracl eCommand.Execut e(OciHandle statementHandle ,
CommandBehavior behavior, Boolean isReader, Boolean needRowid, OciHandle&
rowidDescriptor , ArrayList& refCursorParame terOrdinals) +1919
System.Data.Ora cleClient.Oracl eCommand.Execut e(OciHandle statementHandle ,
CommandBehavior behavior, Boolean needRowid, OciHandle& rowidDescriptor ) +32
System.Data.Ora cleClient.Oracl eCommand.Execut eNonQueryIntern al(Boolean
needRowid, OciHandle& rowidDescriptor ) +170
System.Data.Ora cleClient.Oracl eCommand.Execut eNonQuery() +56
Global.SetDefin eOff() in C:\Documents and Settings\Nathan
Sokalski\VSWebC ache\http://www.webdevlccc.com\lvbeporgte...bal.asax.vb:32
newsadmin.btnSu bmitNotesLink_C lick(Object sender, EventArgs e) in
C:\Documents and Settings\Nathan
Sokalski\VSWebC ache\http://www.webdevlccc.com\lvbeporgte...min.aspx.vb:71
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +108
System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
eventArgument) +57
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
System.Web.UI.P age.ProcessRequ estMain() +1292
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.432 2.2300; ASP.NET
Version:1.1.432 2.2300
Can someone tell me what I am doing wrong or what is causing the error and
what I can do to fix it? Thanks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/