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

  • Home
  • SEARCH
  • 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 6988101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:01:42+00:00 2026-05-27T19:01:42+00:00

I try to show my table data type in datagridview vb.net. Here is the

  • 0

I try to show my table data type in datagridview vb.net. Here is the sample code :

        oradb = "Data Source=(DESCRIPTION=" _
      + "(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & txtServer1.Text & ")(PORT=" & port1.Value & ")))" _
      + "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" & txtSID.Text & ")));" _
      + "User Id=" & txtUsername1.Text & ";" _
      + "Password=" & txtPassword1.Text
        Dim connOracle As New OracleConnection(oradb)

        Try
            connOracle.Open()
            connOracle.Close()
        Catch ex As Exception
            MessageBox.Show(ex.Message.ToString())
        Finally
        End Try

        SQL = "desc hr.employees"
        myCommand1.Connection = connOracle
        myCommand1.CommandText = SQL
        myAdapter1.SelectCommand = myCommand1
        myAdapter1.Fill(myTablePreview)
        DataGridView1.DataSource = myTablePreview

I try login using username “system”. When I run this code, I got error message “ORA-00900: invalid SQL statement”

is there any wrong with my query??
pls helpme. thank’s…..

  • 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-05-27T19:01:43+00:00Added an answer on May 27, 2026 at 7:01 pm

    DESC (DESCRIBE) is a SQL*Plus command, not a SQL verb. SQL*Plus is a front-end tool for SQL, so it adds some commands of its own, and this is one of those. You have to stick with SQL when using OLE DB.

    If you want this data in a client program, you might want to try something like:

    select * 
    from all_tab_columns 
    where table_name = '<your table name>'
    

    or like this:

    Select COLUMN_NAME 
    from user_tab_columns 
    where table_name='EMP'
    

    This is pure (Oracle) SQL, which you can experiment with in SQL*Plus until you get the set of columns that you need.

    Devian Yudha,

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's pretty difficult to show code for ASP.NET here, so I will try my
I am using vb.net. I have a datagridview to show data. Since the datagridview
When I try to execute my code, I'm getting an error dialog: 'Show Disassembly'
I want to insert data in MYSQL database using python here my code import
This compiles: class Ex1 { public int show() { try { int a=10/10; return
iam using setting.bundle and i try to show a hidden picture with Switch toggle
I try to use amazon API using PHP. If I use print_r($parsed_xml->Items->Item->ItemAttributes) it show
Try the following code public enum Color { Blue=1, Red=2, Green=3 } public List<Color>
I will show some minimum code, since I don't think my company wants me
i try to get some Data from a Access Database via OleDB in a

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.