Experts Exchange connects you with the people and services you need so you can get back to work.
Your question, your audience. Choose who sees your identity—and your question—with question security.
<%@ import namespace = "System" %>
<%@ import namespace = "System.Data" %>
<%@ import namespace = "Oracle.DataAccess.Client" %>
<%@ import namespace = "Oracle.DataAccess.Types" %>
<script language="vb" runat="server">
sub getdata(sender as object, e as eventargs)
Dim con As New OracleConnection("User Id=bud;Password=bud;Data Source=bud;")
Dim cmd as OracleCommand = new OracleCommand()
cmd.Connection = con
cmd.CommandType = CommandType.Text
cmd.commandText = " select column_name, data_type, data_length, data_precision from user_tab_columns where table_name=:table_name "
Dim param1 as OracleParameter = cmd.Parameters.Add("table_name", OracleDbType.varchar2, _
50, UCase(table_name.text), ParameterDirection.Input)
genericDataGrid.DataSource = cmd.executeReader()
catch ex as exception
response.write("Error: " & ex.message)
Table name: <asp:textbox id="table_name" columns="40" runat="server" />
<asp:button id="runit" text="Go" onclick="getdata" runat="server" />
<asp:gridview id="genericDataGrid" runat="server" />
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.