C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




tables


Posted Date: 30 Aug 2008      Total Responses: 2

Posted By: kalaimanichozhan       Member Level: Gold     Points: 1


Hi I used following coding to add all tables into arraylist, But i got error...."Invalid Object Name syss.tabe"

Dim con As New SqlConnection("Server=VAXGEN-3;Database=Northwind;uid=sa;pwd=vgn")
con.Open()
Dim cmm As New SqlCommand("select name from sys.tables", con)

Dim da As New SqlDataAdapter(cmm)
Dim dt As New DataTable
da.Fill(dt)
Dim dv As New DataView(dt)
Dim arr As New ArrayList
arr.Add(dv)
con.Close()



In QueryAnalyzer
I executed
exec SP_Tables

I can see Table_Qualifier,Table_Owner,Table_Name,Table_Type,Remarks

How can fetch Only Table_Name




Responses

Author: Arun Kumar    30 Aug 2008Member Level: GoldRating:     Points: 1
select name from sys.tables where Table_Type='table'
try this query.


Author: Sandeep Chougule    30 Aug 2008Member Level: GoldRating:     Points: 6
sql 2005
select name from sys.tables

this querey wiil fetch all tables for ur database

Plz check ur spell in codding

sql 2000 and sql 2005
select Name from Sysobjects where Xtype = 'U' order by Name





Post Reply
You must Sign In to post a response.
Next : Splitting str values using js
Previous : problem
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

it help desk

Contact Us    Privacy Policy    Terms Of Use