.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

select syntax

Posted By:      Posted Date: October 06, 2010    Points: 0   Category :ASP.Net


I'm trying to return some records from my sample table under a title. for example :


in stored proceture operate on a table in Dataset.

now I want to return table above with label : "tbl1" to access table name in Dataset .

View Complete Post

More Related Resource Links

Select statement syntax

Hi guysi am kinda stuck and im sure you can help mei have the following code to add stuff in my database Try Dim cmd As New SqlCommand("INSERT INTO Patient_Basic_Info(PatientID,Patname,Patlastname,DOB,Tel,ErTel,EmailAd,Adress,Insurance,Vdate) VALUES('" + PatID.Text + "','" + Patname.Text + "','" + Patlast.Text + "','" + DatePicker1.SelectedDate + "','" + Pattel.Text + "','" + PatERTel.Text + "','" + Patmail.Text + "','" + PatAddress.Text + "','" + insurancebox + "','" + DatePicker2.SelectedDate + "')", conn) conn.Open() cmd.ExecuteNonQuery() conn.Close() Label1.Visible = True Button1.Visible = False Catch ex As Exception 'handle exception here Label23.Text = ex.Message Finally If conn.State = ConnectionState.Open Then conn.Close() End If conn.Dispose() End Try Now i want a select statement to assign the Name column to a variable where the Vdate = a textbox in my formbasically i want the program to return the Name of a person in my database based on the value in another textbox. I know it doesnt make much sense

Correct Syntax for a Select statement with a date in VB.net 2008 web developer


What is the correct syntax in VB.net 2008 web developer in SQL to do a WHERE clause where the data is >= to the current date? I can't figure out how you pass now into the SQL statement.

AJAX GridView Checkbox Select All in ASP.Net

In the previous article GridView Select Multiple Rows you learnt the multiple row selection in GridView control. Here you will get the C# code sample to select all the gridview rows using single checkbox server control. You can highlight the selected rows with different color and Font state Bold. If you want to use the selection values on different ASP.Net

Select value in gridview


Hi, I am new to gridview. I want to make a gridview. Its row when selected should direct me to a specific .aspx page.Each row should direct to a different page. Should I use querystrings for this? Please suggest. Regards, ap.

Need Syntax To Make Results of LINQ Union Return Non-Generic Type



I have the below SQL which works just fine:

SELECT     Message, CreateDate, AccountId, AlertTypeId
FROM       dbo.Alerts
SELECT     TOP (100) PERCENT Status, CreateDate, AccountId,
                          (SELECT     10 AS Expr1) AS AlertTypeId
FROM         dbo.StatusUpdates
WHERE AccountId = PassedInParameter

I have been going about trying to convert the above into a LINQ method and am having problems with return types.
As the above SQL illustrates, I am querying two distinct LINQ tables - Alerts and StatusUpdates -
and then attempting to perform a Union on them. In order to do the union in LINQ, I have to have agreeing types. So, I
am using "var" to make the results of "alerts" and "updates" generic before the union.  

public IList GetStatusUpdatesAsAlertsByAccountId<T>(Int32 accountId)
            using (WorkbookDataContext dc = _conn.GetCont

T-SQL in Yukon: Powerful New T-SQL Syntax Gives SQL Server a Programmability Boost


The T-SQL language in the upcoming version of SQL Server will provide more power and flexibility than previous versions. Additions and enhancements include error handling with the TRY/CATCH construct, SNAPSHOT isolation, and WAITFOR enhancements. Also important are the BULK rowset provider, common table expressions, recursive queries, PIVOT and UNPIVOT operators, and much more. This article introduces these features so readers will be ready for the next version of SQL Server.

Itzik Ben-Gan

MSDN Magazine February 2004

The XML Files: XSLT Keys, Select vs. Match, Conflict Resolution, and More


This month Aaron Skonnard covers how keys work in XSLT, XSLT match and select attributes, SelectNodes order, finding