I am trying to use an order by statement where it displays all records with the newest ones first, I have a database value called SDate which is formatted DD/MM/YYYY and my statement is as follows:Code:
sql = "Select * from news SORT BY SDate DESC
The error im getting is:
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause. /index.asp, line 104
I've tried adding a ; on the end of DESC but still no luck.
I have a problem when displaying the records from my database - i want to display them ordered by date and time descending.my code PHP Code:
sql = "select * from Problems where Topic = 'Relationships Physical Wellbeing' order by DatePosted desc"
orders my records by date but not by time Posted ( time held in TimePosted Field) how do i write my sql statement to order by..... both DatePosted and TimePosted.
I have an Excel file with one column of data. This excel file, I have saved it as an XML file. Now using the XMLDOM, I am trying to display the contents into a Textarea.
I'm parsing an XML document using the XMLDOM object in ASP. I am running into a problem with a section formatted like this:
<MasterElement> TitleOfElement <Abbreviation> TOE </Abbreviation> </MasterElement>
If I use node.text, I get TitleOfElement TOE. I need to seperate the two but cannot find any reference that addresses this. Of course I can manually parse using standard functions like InStr, but it seems like there should be a more proper way to extract the data. Anyone run into this?
I want to load some HTML which is in a ASP variable into an XMLDOM object but am having no success. All the examples I see point to loading documents from the filesystem using the .Load or .LoadXML methods.
I'm in the process of 'trying' to write a very small CMS which will allow me update an existing XML script I have.
Unfortunately I just cannot get the script to work, my script falls over with an objRoot error when I try to set the objField using selectsinglenode. XML looks like this:
xslProc.input = xmlDoc ' The xml to transform xslProc.transform()
I now want to use the resulting xml output (the xsl transforms to a different grammer) to do some stuff before the whole lot (xml and stuff) is passed back to the page that called it (AJAX). How do i feed the transformed xml into xmldom, domdocument or what every is required for me to navaigate using xpath and so my stuff?
I've had an ASP project dumped on me written in VBScript. I'm actually a C#/ASP.NET developer and am struggling trying to find a way to sort the result of a XPath query executed using SelectNodes? Code:
I have the following code which I try to load an xml file, but in browser, I only get text value for each node, not whole xml string. I expect to see something like:
<name firstName="betty" lastName="Smith">I am at home</name> But I only see text "I am at home" did I do something wrong? Set xmlDom=CreateObject("Microsoft.XMLDOM")
I've got an application setup that uses freightquote.com API to receive XML responses containing shipping information. A basic response example is as follows: Code:
I am developing a simple booking system where I had a booking date. The problem is I want to make sure that the user must book 3 days in advanced for certain room.
I have tried to use DateDiff but it seems doesn't work. Actually i just 1 to make sure that the user must book 3 days in advanced from the current date. I am wondering whether there is anything goes wrong in my datediff function. Code:
This is a follow up to a question I asked two weeks ago which I thought was solved but on further inspection I realised it wasn't working fully. I have an ORDER BY on my search results page, the search uses two dropdown menus, the first one is start character (A-Z), and the other is grade.
The problem I have is that the ORDER BY work perfectly when I leave the start character dropdown blank, and when I use the grade selection dropdown, but when I select a start character I get this error message:
An ASP page outputs data from the query "Select ThisAndThat from comments WHERE pageURL='" & pageURL & "' ORDER BY threadID, datesent" (Access mdb) threadID is a string (OK, I know!), which means that 103 displays before 99. Is there a way to write the SQL query to order them numerically? This would be much easier for me than changing the data type and hunting down every page that INSERTS or UPDATES the db.
I am extremely confused about how i should go about doing this: I have puled out current orders and have displayed in a table .These orders have their own order numbers.
Once the person clicks on first order,the order is displayed in a form,where the user can edit the order details and hit submit.
Now when he hits submit ,I want his to go the previous page where the orders are displayed in table ,so that he can click on the next order and process it/OR may be whent he user hits submit ,i want the next order directly to be displayed in the form.
I have a table in my database with several numbers.(2, 5, 8, 0, 9, 0).Now i retrieve the numbers to my page using "order by numbers", and my page look like this.
0 0 2 5 8 9
I want the lowest number to be first, but if the number is 0 (zero) I want it to go to the bottom.Can that be done
I have one table wich has a unique ID feild for each record and other feilds, and another table that has one field that is a number that contains the an ID from the other table and another field that contains some text.
I want to open with sql the first table, but order its records alphabetically by the text in the second table. is it possible? Code:
When I have the recordset in the order as follows, all works well: (Recordset2.Fields.Item("ProductName").Value) (Recordset2.Fields.Item("ShortDescription").Value) (Recordset2.Fields.Item("Thumbnail").Value)
Though if I have the Thumbnail first the description does'nt show.
I've got a site with PayPal and Google Checkout payment options. The checkout page formats two HTML forms, containing bespoke cart code - one posts to PayPal, the other to Google Checkout.When an order is placed, it needs to be updated back on my site, so that the order is marked as 'paid' in the database. When this is done with PayPal, I just provide a hidden field in the form called 'invoice' containing my id number for that transaction. This is returned in my IPN, and I update the database accordingly. However, I can't find a similar field in Google. Their example code all seems to be in XML and is WAAAAAAAAY more complicated than I need it to be. I just need to send a value with my cart code to Google Checkout, and have that value returned after the transaction has completed. I've set up Google Callback, and the page is being called and the order is being written to my google log txt file, I just need this to contain my order id number for the transaction so I can just add the logic to update the database based on this id number.
I've written the following piece of code which is embedded in HTML. For some reason when the script is processed the last response.write statment is displayed before the information in the while loop. I can't seem to figure out why this is happenming.
I'm working on a list of members.In my db I have two columns lastName and marriedName lastName is the member name before they got married and legLastName is their lastname after they got married.
Now I need to display theese two columns in alphabetical order in one list. If I for example have theese members: lastName, marriedName Anderson, Johnson Petersson, Svensson Nilsson, Persson Lindgren, Johnson
I want this result: Anderson Johnson (look for Andersson) Johnson(look for Lindgren) Nilsson Persson(look for Nilsson) Petersson Svensson(look for Petersson)
I am processing the variables from a form submission with a for/next loop. The problem is that the order of the variables are NOT written IN ORDER.
Form field 1 prints fine but then it jumps to Form field 9 and then back to Form field 4 then to Form field 2, etc. IS there a way to process the form variables in a loop in ORDER? field 1, field 2, field 3, etc? Code: