Hello Everyone and thanks for your help in advance. I am working on an application that connects to SQL Server. I need to find out if there is any way (I know there is, not sure how) to retrieve a list of tables within a database and also, a way to retrieve a list of databases within a server. I am using VB.Net in a web application. Any help on this owuld be greatly appreciated.
Is there a way to retrieve the parameter list for a given stored procedure?
I am trying to create a program that will autogenerate a list of stored procedures and their parameters so that changes to the database can be accurately reflected in code.
hello i want to know if there is any way to retrieve all the tables for a Database programmatically. i want to connect to a server and select a database .then by selecting the database all it's tables be loaded into a ComboBox(for example)..the tables name i mean. i want to give the user the option to select a table from a database.if it is possible help me my programming language is C#.Net any information is appereicated Somayeh
I have two temporary tables, both contain field 'BranchID'.
First table @TEMPNET returns 10 different BranchIDs, but the second table @TEMPCREDIT returns only 7 of those IDs, so when I run select from both tables 'WHERE N.BranchID = C.BranchID2' the result is blank. If I limit both tables to the IDs that are the same in both sets, it works.
How can I get ALL the results from table1 AND the results from table2 which match table1?
DECLARE @TEMPNET TABLE ( BranchID int , NetSales decimal(18,4) , Cost decimal(18,4) , SaleMonthNbr int , SaleMonth varchar(15))
I am accessing data (YTD Hours for a selected employee) through the view "dbo_TIMS_HSTU_HoursHist_Insync" which is connected by ODBC to my application. The result "HSTUHoursPriorPeriods" is used to determine the rate of pay for a specific employee and is run literall each time a user enters a pay record at data entry.
Because the view itself returns about 1,000 records, before I select the specific record and associated Hours, it is a little slow from a data entry standpoint.
I understand I can achieve the same result through an SQL Procedure, but for the life of me I don't know how.
Hello there! I've been sitting here thinking how to work through this problem but I am stuck. First off I have two tables I am working with. Request TablerqstKey (this is the primary key and has the identity set to yes)entryDte datetimesummary nvarchar(50)etryUserID nvarchar(50)rqstStatusCdeKey bigint ReqStatusCode TablerqstStatusCdeKey bigintstatusCode nvarchar(50) I have webforms that are using Session variables to store information from the webpages into those variables and insert them into these tables. However, I am wanting to insert the rqstStatusCdeKey (from the ReqStatusCode Table) value into the Request Table. The rqstStatusCdeKey value i am wanting to insert is '3' which stands for "in Design" (((this is going to be the default value))). I need help :-/ If you need me to explain more/ clarify, and show more information I can. Thank you so much!!!
Hi, How to ennumerate the Rights of an User for all the tables [Select/Insert/Update/Delete] in a database or how to ennumerate/list all the Table rights for a particular user in a database? By User, i mean the Login names [like bill, sam, sa] and not dbowner, public, etc. thanx in advance.
VS 2005 SQL 2005 Reporting Services Firebird.Net Data Provider 2.0 Firebird Database 1.5
This is what I am trying to do:
In SQL Server 2005 Analysis project,
Create a Data Source Create a Data Source View And Create a Report Model
I have successfully created the data source. When I try to create a Data Source View, it lists all the tables in the Firebird database. In the last step, when VS tries to import the metadata to its storage (I think), the Firebird Client throws the following exception:
at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior behavior) at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.DataWarehouse.Design.DataSourceConnection.FillDataSet(DataSet dataSet, String schemaName, String tableName, String tableType) at Microsoft.AnalysisServices.Design.DataSourceDesigner.AddRemoveObjectsFromDSV()
===================================
Exception of type 'FirebirdSql.Data.Common.IscException' was thrown. (FirebirdSql.Data.FirebirdClient)
------------------------------ Program Location:
at FirebirdSql.Data.Client.Gds.GdsConnection.ReadStatusVector() at FirebirdSql.Data.Client.Gds.GdsConnection.ReadResponse() at FirebirdSql.Data.Client.Gds.GdsDatabase.ReadResponse() at FirebirdSql.Data.Client.Gds.GdsStatement.Prepare(String commandText) at FirebirdSql.Data.FirebirdClient.FbCommand.Prepare(Boolean returnsSet) at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior behavior, Boolean returnsSet) at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior behavior)
<Error end>
Few notes:
If I remove the checkbox of €śCreate logical relationships by matching columns€?, the wizard proceeds smoothly. But when I open the data source view, there are no tables there and if I try to add more tables, I receive the same error as above.
I am also trying to follow this up the Firebird Client project since the error was thrown by Firebird DLL. However, has somebody done this before and/or can provide me some direction/information as to what I might be doing wrong?
Currently i am defining a simple relationship between Customers->Orders->Order Details through the Database Diagrams feature in the SQL 2K. Using the Server Explorer, i can see the Database Diagrams, but when i try to "drop" the Database Diagrams into the page, it gives the error message.
I would like to know the procedures to retrieve the database relationships from Database Diagrams and manipulate them through ADO.NET
I prefer to "convert" already defined relationship using SQL Server Database Diagrams into XSD file or probably there is another method to "read" those relationship and manipulate them.
Does any one know what command(s) I can use from a SQL prompt to tell me what tables are cruuently residing in a particular database. I'm looking for something along the lines of "select list_of_all_tables from tempdb", which can be applied to any valid db on the system.
Hi, I got a request from a devloper asking, how can he find out what tables his stored procedure his using, so he can remove unwanted SP which are using old tables in the database.
I'm brain-dead today, sadly. If it weren't for IE remembering previous entries, I don't know if my name and email would have made it into the header correct :-)
I want the SQL command that lists the names of all user tables.
Alternatively, I have the following problematic Access 2000 code:
Public Sub ListAllTables() Dim cat As New ADOX.Catalog Dim tbl As New ADOX.Table Dim cnn As New ADODB.Connection Dim i As Integer, j As Integer Dim vgRet As Variant Dim intPrefixLen As Integer Dim strAppend As String
For j = (cat.Tables.Count - 1) To 0 Step -1 Set tbl = cat.Tables(j) With tbl Debug.Print tbl.Name vgRet = SysCmd(acSysCmdSetStatus, tbl.Name) End With Next
Set tbl = Nothing Set cnn = Nothing Set cat = Nothing DoCmd.Hourglass False vgRet = SysCmd(acSysCmdSetStatus, " ") End Sub
This code runs fine against an MDB but against SQL it includes all the views, rather than just the tables. If you have a fix for this, that will do just fine!
Sometimes, when a try to list tables or view (or access Management, etc) Enterprise Manager hungs up. Using SELECT * FROM SYSOBECTS also freezes the process. But the SQLServer is operational for data updates and retrieves.
I'm very new in SQL Server. Please help me to combine the connection string to the server. 62.33.197.7 login: sa pwd: S#15trLdatabase What would be the connection string then? And can I get the tables names if I have the connection string?
// C - Categories, P - Parameters, CP_Link - linkage table between C and P
// Basically, it is a list of features belonging to a particular category.
DROP TABLE [C]; CREATE TABLE [C] ( ID_CAutoinc, Name varchar(32), PRIMARY KEY( ID_C )
[code]....
OK, this works fine, but I want to get a list of parameters (from P table) which holds only those items that linked to all categories requested. In other words, I want only 'leg' and 'hand', but not the 'beard', because 'girls' not linked to 'beard'.Only common features for all of categories listed "IN (,,,)" wanted.
Hi,I need to list all the tables in northwind database.I'm using sql server 2000.In query analyser i'm in master database.I don't want to change the database to northwind.How to list all the tables in northwind database when the databasecombobox has master in query analyser.I want to run this query with database name.I won't want to run forcurrent database.Kindly help me to solve the problem.Thanks & Regards,Mani
Hi All. I'm an Oracle DBA who's currently being asked to look at a SqlServer Database. I need a list of columns per table, but am having trouble. I'll admit I might be being lazy here, but I'm in a hurry and using the valueable resources available to me!! Would really appreciate the sql i need to copy into the query window. Much obliged!! I need........ Table A Column1 Datatype Column2 Datatype Table B Column1 Datatype Column2 Datatype etc.... Many thanks.
I guess it's possible to do that, because in SQL Server Management Studio, all things(such as Tables,Triggers, Indexes, Constraints, Keys) are displayed in the TreeView.
But I am quite don't understand how to do that with T-SQL.