Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 17th, 2004, 01:35 PM
Authorized User
 
Join Date: Jun 2004
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database question!

I have a textarea that I use to retrieve comment from users. In the database it displays like the following.

Department Feed Back: 2, 1,

As you can see the 1 was the first data that was updated then number 2 is second update that was done. How can I get it to read the other way around like 1, 2, 3 etc.. In other words how can I get it that colum to display left to right?
________________________________________

What about when it's being updated! I could do something like this but I am getting errors. Can you help me debug it? Tell me if it will work or not.

Thanks

I am getting the following errors:

Microsoft OLE DB Provider for SQL Server error '80040e14'

Incorrect syntax near the keyword 'ORDER'.

/forms/Updated_Successfully.asp, line 52


strSQL = "UPDATE Escalation_Forms SET Status='"& request.form("Status") &"', ORDER BY Wip_Com DESC ='"& request.form("Wip_Com") &"' Where Ticket_Number=" & Session("TicketNum")
 
Old August 17th, 2004, 01:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

After you update the DB you then create another strSQL2 and SELECT * FROM Table_name ORDER BY whatever_here.

 
Old August 17th, 2004, 02:13 PM
Authorized User
 
Join Date: Jun 2004
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi I tried it and I am coming up with the following error
Line 1: Incorrect syntax near '='.

/forms/Updated_Successfully.asp, line 54

strSQL = "UPDATE Escalation_Forms SET Status='"& request.form("Status") &"', Wip_Com ='"& request.form("Wip_Com") &"' Where Ticket_Number=" & Session("TicketNum")

strSQL2 = "Select * from Escalation_Forms ORDER BY Wip_Com DESC;"

This line 54: ObjRS.open strSQL, ObjConn, 3, 3



 
Old August 17th, 2004, 05:23 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Calibus,

You are running an update statement that doesn't return any result to be stored into a recordset and process later. So why do you want to use this?
ObjRS.open strSQL, ObjConn, 3, 3

Instead use
ObjConn.Execute(strSQL)

Hope that helps
Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Question rose77 Access 0 January 9th, 2005 02:14 PM
Database question hlchuah77 SQL Language 5 November 12th, 2004 12:40 PM
HELP database question TnTandyO Classic ASP Databases 0 December 1st, 2003 12:39 PM
database question. kyootepuffy Classic ASP Databases 5 September 29th, 2003 03:11 PM
database question writedom VS.NET 2002/2003 2 July 29th, 2003 05:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.