Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 13th, 2004, 08:37 PM
Authorized User
 
Join Date: Jun 2004
Location: , , .
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Raif
Default Sql statements in data adapter

can you use all the same sort of select query functions in ado.net as you can in sql server? for instance I want to pull a dataset from a database using a sql statement that groups by and counts different columns. This statement works in sql server "SELECT PKDate, COUNT(S1Tr) AS S1Sum, COUNT(S2Tr) AS S2Sum, COUNT(S3Tr) AS S3Sum FROM(tblSlots)GROUP BY PKDate"
it groups by pkdate and creates new columns S1Sum etc as counts of S1Tr etc. but my asp.net page will have none of it.
Also where can I get the syntax and restrictions for my select statements in .net? I have seen all manner of different versions such as using [] on all tables and fields. including the table.field for every field even if you are only using one field etc. Is there some comprehensive rule set somewhere?
Thanks
Raif

  #2 (permalink)  
Old July 14th, 2004, 08:50 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,409
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The query you use in .NET is dependant on the underlying database system. If you are using MSSQL, feel free to use any MSSQL specific syntax. ADO.NET shouldn't restrict you. The [] you might see are again a database specific syntax. In MSSQL (and probably others) if you give a field or table a name that matches one of the MSSQL keywords you would wrap it in [] so MSSQL knows you mean a field or table name. (i.e.: SELECT [SELECT] FROM [SELECT])
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
filling the combobox using sql data adapter kumaran BOOK: Professional .NET 2.0 Generics 4 October 5th, 2015 07:57 AM
Data Adapter k_kosaraju ADO.NET 1 October 31st, 2004 08:51 AM
Adapter for SQL erisa Biztalk 3 February 25th, 2004 08:28 AM
SQL Data Adapter jbenson001 ASP.NET 1.x and 2.0 Application Design 6 December 18th, 2003 11:13 AM



All times are GMT -4. The time now is 06:59 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.