How to find database table and their field name run time.

 I am using sql server as back end. Through connection string I am getting database name. But in A dropdown I want to show list of table in that database. And in another B drop down I want to show fields of table selected in A dropdown. can any one help in getting the field .

 

0
ameya_amu
7/8/2007 3:28:20 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

2 Replies
670 Views

Similar Articles

[PageSpeed] 39

 The sp_Tables query will return the tables in a database and sp_Columns returns the column names

http://www.vb-tips.com/dbpages.aspx?ID=9e2d9af4-3909-421d-b422-87c1d376674d

 

 


Silverlight-help
Vb Tips
Space Coast .Net User Group
0
Ken
7/8/2007 5:08:37 PM

And if you want to dig deeper into the structure of the database or server, you can use SQL-DMO in SQL Server 2000 or SMO (SQL Management Objects) in SQL Server 2005.

Don 


Don Kiely, MCP, MCSD
In the Last Frontier, Interior Alaska
Please post questions and replies to the forum! And remember to MARK AS ANSWER when someone definitively answers a question or resolves a problem!
0
donkiely
7/9/2007 12:28:38 AM
Reply:

Similar Artilces:

The Microsoft Jet database engine cannot find the input table or query 'table name'. Make sure it exists and that its name is spelled correctly.
I have an access database linked to the contacts folder of outlook. I used the access link table wizard to do so. I am able to view the table in access. However, when Im trying to access the table in my .net application, i get: The Microsoft Jet database engine cannot find the input table or query 'IPContacts'. Make sure it exists and that its name is spelled correctly.  Where my table is called IPContacts. The outlook contacts folder is part of our excahnger server. When I tried to link directly to the exchange server, Access crashed. THe only look that worked was through outlook...

Can ADO.Net query/update a MS Access database that contains table and fields that contain blank spaces and characters such as "#" in their names?????
I've recently been assigned an asp.net/MS Access project. My code works fine; however, there are table and fields in the Access database that contain blank spaces and characters such as "#" in their names. For example there is a table named "Purchase Orders" and in this table there are a few column fields with names such as "PO#" and “Customer PO#". My question: Is there some sort of wrapping method that I need to implement to allow my ADO.net objects (particularly the "OleDbDataAdapter" and the "DataRow") to accept these naming...

CustomValidator searches database field (but it appears the problem is not finding the table in the database)
When attempting to use a CustomValidator search through a database to see if a TextBox input matches any entry in a field, an error "Cannot find table 0" is generated.  Previous posts suggest this error indicates it can't find the table, and though this is just a guess (maybe more than one problem present), I find it credible since the name of the table is "users" and at no point while revising the code did I find a place where I thought I should put the word "users" to direct the code to the appropriate table. This builds on the tutorial (with slight modification) found at: ...

Database triggers - SQL Server
I would like to ensure data integrity in a column (actually multiple columns will need a trigger) in my table(s) by setting up a trigger which allows an update of my database field only if the value which is being written to the field in the database exists in another column (in another "check" table).eg. I only want values "Yes", "No" or "" in many of my fields, which I store in a column named "YesNoBlank" in another table.Does anyone know the easy way to do this? / Syntax for the trigger? Why not use PK/FK instead of trigger? I ...

Finding database run time?
Running 7.0.4 engine and database, with sybase central 9.0.1, is there any way of finding out when either the database or the engine were last started, or equivalently, how long they've been running? TIA! Dave Kerber -- Remove the ns_ from if replying by e-mail (but keep posts in the newsgroups if possible). Did you happen to find a way to see the running time of a ASA 9 engine that I am not aware of??? Actually while this sounds like a useful enhancement request (in fact two such values are useful, running time/startup date/time for the server and last startup ...

I imported a SQL Table into SQL DataBase, But I can not update this table even with SQL Server management Studio
I imported a SQL Table into SQL DataBase, But I can not update this table even with SQL Server management Studio When I change any data on mentioned table above, Red exclamation sign appears left of the record . How can I correct this problem?  Thanks. Try running the UPDATE via Query Analyzer...and see if you get an error.***********************Dinakar NethiLife is short. Enjoy it.***********************...

Changing Table Names / Field Names on Membership / User tables
I am building a web app and I had the whole database structure designed but I want to include the built in membership controls and things but I want to change the names of the tables and possibly the field names. Do I have to build my own provider for this? I do have extra fields I want to use two.I consider myself an avid ASP.net'er but building these custom providers seems like A LOT of work... Basically I resesigning a web app I made for our company, doing everythin in asp.net 2.0 and I'm going to start using LLBLGen Pro. I'm about 5 minutes away from dropping the whole membership things...

Link FoxPro Database table to SQL Server Database table
I have LAN Server in witch Visual Foxpro Database reside.I have another remote server in witch SQL Server 2005 installed.I want to link Foxpro table to SQL Server Database Table.Is it possible? Can please someone help? Thanks MS...

How to find the status, i.e. "next run time" and "last run time", of a task which is run through windows task scheduler !
--00c09f93d7653439de0488814544 Content-Type: text/plain; charset=ISO-8859-1 Hi all, I want to know how to find the status, i.e. "next run time" and "last run time", of a task which is run through windows task scheduler. This is required so as to find out instances where a task gets "hanged" after run through windows task scheduler. Thanks & Regards, Amit Saxena --00c09f93d7653439de0488814544-- On Tue, Jun 8, 2010 at 05:18, Amit Saxena <learn.tech123@gmail.com> wrote: > Hi all, > > I want to know how to find the status, i....

Move a Table from one SQL 2005 Database to Another SQL 2005 Database
I created a table in an SQL 2005 database, however, I want to move that table and the data to another SQL 2005 database (within the same server). I am new to SQL 2005 and detailed instructions would be greatly appreciated. Thanks Bill You have two options the first is clean but the second is easier.  Try the links below for details.  Hope this helps. http://msdn2.microsoft.com/en-us/library/ms174335.aspx http://msdn2.microsoft.com/en-us/library/ms188029.aspx  Kind regards,Gift Peddie Thanks, but the documentations is somewhat overwhelming and was hoping of a ba...

Pulling table name from SQL server Database
Hi, Is it possible to pull the names of all tables from my database "Phones" and display them in some way on the screen (listbox, dropdown, checkbox group)? I am aware there is not alot of information here but any help would be great!   Thanks This should work:SELECT name FROM dbo.sysobjects WHERE xtype = 'U' some other types are: 'V' - views 'S' - system tables  --Rob WallingASP.NET MVPMy blog, Software by RobPlease click "Mark as Answer" if my post helped you. This is from the code posted by Cetin Basoz on another f...

[Firebird] Creating database + tables at run-time?
Hello Google returned several articles where people use an application to create a database file and tables, but few showing how to create those at run-time, from scratch. I'd like to try IBDAC to do this, but it fails: ======= type TForm1 = class(TForm) IBCConnection1: TIBCConnection; IBCQuery1: TIBCQuery; IBCUpdateSQL1: TIBCUpdateSQL; IBCDataSource1: TIBCDataSource; DBGrid1: TDBGrid; [...] procedure TForm1.Button1Click(Sender: TObject); begin With IBCConnection1 do begin //Define server + database Server := 'localhost'...

SQL datasource running the same query mutliple times
I have multiple SQLDatasources on multiple pages. When I call the Select command for the datasource the query is run multiple times. I was wondering if anyone had any problems like this. The data is being read into listboxes. If you need any more info or have any specific questions, feel free to ask. bolinc:When I call the Select command for the datasource the query is run multiple times. How do you come to know ?Can you explain it further ? How you've setup the data source(s) ? Which page you think can be the culprit and the code highlights of that page ?Thanks,Dhimant Trivedi&q...

Displaying related fields with an SQL database and ADO.NET
Okay, so I know how to display a singular table from an SQL databse into a datagrid, but I was never shown how to display related fields into one table. Here is the problem: I need to display student information for an online college solution. The information I need to display is First Name, Last Name, and some information from the course they are currently taking. Now - the student information is in a Student table and the course information is in (you guessed it) the Course table. The student table contains a foreign key, the courseID, which is obviously the key in the course table....

Web resources about - How to find database table and their field name run time. - asp.net.sql-datasource

Database - Wikipedia, the free encyclopedia
... requiring information. For example, modelling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database ...

Database - Wikipedia, the free encyclopedia
A database is an organized collection of data . The data are typically organized to model aspects of reality in a way that supports processes ...

Social Side of Code, Database CI and REST API Testing in Methods & Tools Winter 2015 issue
... for software developers, testers and project managers – has published its Winter 2015 issue that discusses the social side of code, database ...

Dodgy database exposes details of 191 million US voters
... years, there's a high chance that your personal details are now out in the wild. Security researcher Chris Vickery found a misconfigured database ...

Huge database of 191 million U.S. voters found on the open Internet
... such bulk information online, a recent discovery seems to indicate. According to VentureBeat , a security researcher found the exposed database ...

Top US School District Switches to Rimini Street for Oracle Database and Oracle E-Business Suite Support ...
Douglas County School District using savings from Rimini Street independent support to develop district-wide data visualization capabilities ...

IDG Contributor Network: Shrinking an already ginormous SharePoint database transaction log
Last month, I wrote about how to avoid having ginormous transaction logs within SharePoint databases. But what if it’s too late, and your files ...

Massive Voter Database Left Open For Public Consumption
Gosh, we could have avoided all the angst about the Clinton/Sanders voter database breach if only we'd known about this major database , accessible ...

18 million targeted voter records exposed by database error
A second database containing voter records has been exposed due to a configuration error. While the first held records that some dismissed inconsequential ...

Botched database leaks records for 191 million voters
... sometime this century? If so, your personal info may be out in the open. Researcher Chris Vickery has discovered that a badly configured database ...

Resources last updated: 1/19/2016 5:28:12 AM