Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

My application is made to work with either an Excel, Access, or SQL database (I use typical Database select, update, insert, etc.. calls)

In the case of EXCEL or ACCESS the user has the ability to Launch the actual application to view the DB contents - seeing as the user now has the ability to view the RAW DATA I need a way to "cleanup" the information.

 

The Database has 3 columns ([CLIENTS], [ASSIGNMENTS], [sTATUS]) and multiple rows therefore I need a way to SORT the Database Alphabetically by [CLIENTS] and then by [ASSIGNMENTS].

It occurs to me that this must not be that uncommon of a request so I was wondering if anyone had any hints/helps or samples that could pave the way.

Something efficient would be best seeing as there can be a LOT of rows - are there any common methods, algorithms, built in SORTing calls? etc...

Posted

I think you're only able to do a permanent sorting in Excel. Access and SQL server are database engines and they keep their own sorting based on the primary key and things like that.

 

/Kejpa

Posted (edited)

I would completly agree (guess sorting those is competly ridiculous).

 

However my question still stands for EXCEL - the user is able to use excel "as a database", most of the time they will do this because they wan't to be able to open it in EXCEL also. Therefore, for it to make sense, I need to sort the Excel worksheet.

 

Is there a way? Some know algorithms or methods?

 

Couldn't I simply:

- read in memory (dateset) the entire database

- delete all rows in the database

- sort the internal dataset

- write out all the lines (line by line if I have to) into the database.

I know it sounds ugly but wouldn't it work?

Edited by Shaitan00
Posted

Sorry,

can't help you. I've never done any database handling with Excel, I'm always convicing the people that think Excel is a database that it's not and show the benefits of using a "real" database engine.

 

Good luck!

/Kejpa

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...