Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7749601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:05:06+00:00 2026-06-01T11:05:06+00:00

I have installed Oracle 10g Express Edition database on a server and install the

  • 0

I have installed Oracle 10g Express Edition database on a server and install the client on my PC.

Now, I`m developing a vb.net application using visual studio 2005 and I need to use the oracle 10g express edition database. So I initialize the connection using the following connection string:

_connectionString = "User Id=Graphya;Password=Graphya;Data Source=gis64:1522/XE;"

Then I define new OracleDataAdapter, and I use the following code to fill a dataset:

Dim insertCommand As OracleCommand = New OracleCommand()
Dim commandTextTemplate As String = "INSERT INTO {0}(" & g_pfldUsername & ", " & g_pfldSubject & ") VALUES (?, ?)"
insertCommand.CommandText = String.Format(commandTextTemplate,TABLE_NAME)
insertCommand.Connection = Me.Connection
insertCommand.Parameters.Add(New Oracle.DataAccess.Client.OracleParameter(g_pfldUsername, Oracle.DataAccess.Client.OracleDbType.Varchar2, 50, g_pfldUsername))
insertCommand.Parameters.Add(New Oracle.DataAccess.Client.OracleParameter(g_pfldSubject, Oracle.DataAccess.Client.OracleDbType.Varchar2, 50, g_pfldSubject))
 
_OracleDataAdapter.InsertCommand = insertCommand
 
_OracleDataAdapter.Fill(_dataSet, TABLE_NAME)

So after debugging this code I got the following error:

Unable to cast object of type ‘Oracle.DataAccess.Client.OracleCommand’ to type ‘System.Data.Common.DbCommand’.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T11:05:07+00:00Added an answer on June 1, 2026 at 11:05 am

    @Davideg: my code is c# to fill data set

    OleDbConnection cnOra = new OleDbConnection("Provider=MSDAORA;Data Source=myOracleServer;" 
                  + "user id=myUID;password=myPWD;"
                  + "persist security info=false;");
            OleDbCommand cmdPerson = new OleDbCommand
            + ("{call PackPerson.allPerson({resultset 3, ssn, fname, lname})}", cnOra);
    
        OleDbDataAdapter daPerson = new OleDbDataAdapter(cmdPerson);
        cnOra.Open();
        DataSet ds = new DataSet();
        daPerson.Fill(ds,"Person");
        this.dataGrid1.DataSource = ds.Tables["Person"];
        cnOra.Close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Oracle Database 10g Express Edition on windows. I want to install
I have installed Oracle Database 11g Express Edition on my pc (windows 7) and
I have Oracle 10g xe installed but i also need to install Oracle Database
I have installed Oracle 10g and now want to install 11g also...How can I
I have written a C# application that connects to an Oracle 10g database. Using
I have oracle 10g installed on windows server 2003. I have 22,000,000 records in
I have installed the Oracle Client for the 64 bit machine using the XCopy
Oracle installed on the server is 10.2.0.3 Enterprise Edition 64bit (10g). ODAC is showing
I have to connect to a Oracle server on the network using a .NET
I have installed Oracle 10G XE. I want to connect to it using JDBC

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.