displaying sql server records need help 
Author Message
 displaying sql server records need help

Looking for new ways to display records from a sql database on a asp page
searching the data from different categories chose from a pulldown menu and
text input box, any suggestions or links to information would be great

an example of how we are doing it could be found at
http://www.*-*-*.com/

but some of the problems I have with the asp I am using now is that I cant
get the results in a alphabetical order that I want
I cant seem to apply a 'order by' to it
the top code is of the post to asp page is

<%

Dim Sqlstuff
Set dbGlobalWeb = Server.CreateObject("ADODB.Connection")
dbGlobalWeb.Open("Masterlist")
Sqlstuff = "SELECT * FROM MasterListBaytown"

If Request.Form("TypeSearch") = "Category" Then
 Sqlstuff = Sqlstuff & " WHERE Category LIKE '%" & Request.Form("inbox") &
"%'"
End If

then write the records returned

Thanks much for any help



Fri, 12 Sep 2003 14:13:11 GMT  
 displaying sql server records need help



Quote:
> Looking for new ways to display records from a sql database on a asp page
> searching the data from different categories chose from a pulldown menu
and
> text input box, any suggestions or links to information would be great

have a look to www.mylittletools.net


Fri, 12 Sep 2003 18:37:22 GMT  
 displaying sql server records need help
You can let SQL server do the ordering for you, simply add 'order by [column
name]'
Add the 'DESC' if you want to order descending

eg

select * from Customers_table order by lastname desc, firstname desc,
telephone asc

this will order by lastname then firstname and then by telephone number.


Quote:
> Looking for new ways to display records from a sql database on a asp page
> searching the data from different categories chose from a pulldown menu
and
> text input box, any suggestions or links to information would be great

> an example of how we are doing it could be found at
> http://www.auburnareawa.org/members.asp

> but some of the problems I have with the asp I am using now is that I cant
> get the results in a alphabetical order that I want
> I cant seem to apply a 'order by' to it
> the top code is of the post to asp page is

> <%

> Dim Sqlstuff
> Set dbGlobalWeb = Server.CreateObject("ADODB.Connection")
> dbGlobalWeb.Open("Masterlist")
> Sqlstuff = "SELECT * FROM MasterListBaytown"

> If Request.Form("TypeSearch") = "Category" Then
>  Sqlstuff = Sqlstuff & " WHERE Category LIKE '%" & Request.Form("inbox") &
> "%'"
> End If

> then write the records returned

> Thanks much for any help




Sat, 13 Sep 2003 05:02:23 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. need help with copy .dbf records to SQL server

2. Need Record locking help on SQL server and VB6

3. need help with record fetch from SQL server

4. Problem seeking for records with ADO and SQL Server, Please Help

5. Need help getting records from SQL

6. need ID from newly inserted record (altered by insert trigger on SQL server)

7. HELP needed: missing one record when displaying in DataGrid

8. NEED HELP with Displaying records

9. Need Help in building a connection to SQL server

10. Upsizing ACCESS to SQL SERVER, Need Help

11. Need Help In SQL Server - Store Procedure

12. I need help disconnecting fro SQL Server....

 

 
Powered by phpBB® Forum Software