3 Replies Latest reply on Feb 24, 2011 6:30 PM by 842619

    Data provider internal error(-3000) [System.String]

    221362
      Hi. - Hope some one can help.

      I am trying to use the vb.net examples that were kindly posted here: http://www.oracle.com/technology/pub/articles/cook_dotnet.html

      ..and am hitting a little problem:

      When ever the call to conn.open is made I get this error:

      Data provider internal error(-3000) [System.String]

      I have searched Google, OTN and Metalink. In metalink I saw a similar error and changed my sqlnet.ora file as directed but I'm still getting this problem.

      I have included the stack trace and code in case its of any use.

      I am using VB2005, with 10.2.0.100 of Oracle.DataAccess against a 10.2 db on XP Pro.

      Thanks and Regards



      Oracle.DataAccess.Client.OracleException was unhandled
      DataSource=""
      Message="Data provider internal error(-3000) [System.String]"
      Number=-3000
      Procedure=""
      Source="Oracle Data Provider for .NET"
      StackTrace:
      at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)
      at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
      at Oracle.DataAccess.Client.OracleConnection.Open()
      at WindowsApplication1.Form1.Form1_Load(Object sender, EventArgs e) in C:\Documents and Settings\root\My Documents\Visual Studio 2005\Projects\oracle\oracle\Form1.vb:line 19
      at System.EventHandler.Invoke(Object sender, EventArgs e)
      at System.Windows.Forms.Form.OnLoad(EventArgs e)
      at System.Windows.Forms.Form.OnCreateControl()
      at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
      at System.Windows.Forms.Control.CreateControl()
      at System.Windows.Forms.Control.WmShowWindow(Message& m)
      at System.Windows.Forms.Control.WndProc(Message& m)
      at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
      at System.Windows.Forms.ContainerControl.WndProc(Message& m)
      at System.Windows.Forms.Form.WmShowWindow(Message& m)
      at System.Windows.Forms.Form.WndProc(Message& m)
      at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
      at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
      at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
      at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
      at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
      at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
      at System.Windows.Forms.Control.set_Visible(Boolean value)
      at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
      at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
      at System.Windows.Forms.Application.Run(ApplicationContext context)
      at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
      at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
      at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
      at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
      at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
      at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
      at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
      at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
      at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
      at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
      at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
      at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
      at System.Threading.ThreadHelper.ThreadStart()


      My code looks like this:

      Imports System.Data ' VB.NET
      Imports Oracle.DataAccess.Client ' ODP.NET Oracle managed provider

      Public Class Form1

      Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

      Dim oradb As String = "Data Source=(DESCRIPTION=" _
      + "(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))" _
      + "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCL)));" _
      + "User Id=scott;Password=tiger;"



      Dim conn As New OracleConnection(oradb) ' VB.NET
      conn.Open()

      Dim cmd As New OracleCommand
      cmd.Connection = conn
      cmd.CommandText = "select user from user_users"
      cmd.CommandType = CommandType.Text

      Dim dr As OracleDataReader = cmd.ExecuteReader()
      dr.Read()
      Label1.Text = dr.Item("user") ' or dr.Item(0)

      conn.Dispose()





      End Sub

      Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

      End Sub
      End Class