PDA

View Full Version : Access and Web Page Advice Needed Please


Emma Crabtree
30th June 2006, 09:44
Hi,

I've been asked to update an Access Database so that information is shown in a particular order on a particular web page.

I've put the order in correctly on the database, but it's not showing like for like on the web page.

Does anyone have any suggestions? All kindly received.

Thanks in advance,
Emma.

garyk
30th June 2006, 09:46
How are you display the data, via a SELECT query? if so you need to add an ORDER BY clause

Emma Crabtree
30th June 2006, 11:07
I've no idea what you've just said!

garyk
30th June 2006, 11:10
Ok well the bottom line is that a database will not display records in the order you entered them. My guess is you are returning records straight from a table and so you need to put an index on the column you want the results sorted by.

Gary

Emma Crabtree
30th June 2006, 11:31
OK, I kind of understand what you're saying. So, basically, I can't do what the client wants me to do without altering her database. Is putting an index on the column easy enough?

garyk
30th June 2006, 11:38
Yes adding and index is easy enough.

Emma Crabtree
30th June 2006, 11:40
Am I going to have to send you a tube of smarties to find out how?!

mattk
30th June 2006, 11:47
You don't need to alter the database, you only need to alter the query that is returning data.

NuBlue
30th June 2006, 11:50
I'll show you how for a tube of smarties :)

garyk
30th June 2006, 11:57
Emma, yes tip the smarties out, roll up a handful of £20 notes and shove them inside and send to...... :)

OK open the database in access
Click on 'Tables' to get a list of tables in the database
Right click on the required table and select 'Design View'
Then select the column you wish to order on by clicking on it
Then at the bottom you will see a field 'Indexed' And it will give you the options of 'No', 'Yes (Duplicates OK)', 'Yes (No Duplicates)', you probably just want to select Yes and Dupes ok.

Job done!

Gary

Emma Crabtree
30th June 2006, 13:28
I think you may have to resort to a broken up kit kat...

Now I am confused again, cause I don't want to list all the items in a particular order, just a teeny weeny selection.

I think I shall put this down to Friday blues, tell the client some b**l, and take my sun-glasses and a large G&T outside.

Saude!

Emma.

DuaneJackson
30th June 2006, 13:56
The point of the database is that you can order data however you want and select whichever records you want to display - assuming the udnerlying database structure is right.

If it's windows based hosting and you are using ASP pages to display the data then send me over the details and I'll do it all for you. It is Friday afternoon and it's a very quick job.

I will expect a tube of smarties in the post though!

duane at keyone dot co.uk

Emma Crabtree
30th June 2006, 14:29
I've been told it's the script at the back end that needs changing (which makes sense), and I ain't going there!

So, I get to keep the kit kat which is going a bit squidgy in the heat...

But thanks for your comments and tips, guys.

Cheers,
Emma.

DuaneJackson
30th June 2006, 14:31
Fair enough - I've just done my freebie job for a bit of karma on another thread now anyway : )

Back to the real work now I guess!