PC Review


Reply
Thread Tools Rate Thread

C# + Access Database Problem

 
 
ATXTech
Guest
Posts: n/a
 
      13th Jul 2006
I am using a Access created database with a program I wrote in C# to
create and track helpdesk tickets. I store basic stuff like customer
name, number, issue, tech assigned, etc. with in the database.

**PROBLEM**
The database worked fine in saving and displaying records until it
reaced the 26th record. When ever you open the ticket program, it
retrieves the data from the database on the server and shows the last
entry in the database first. For example the tickets show like this:
28,27,26,1,2,3,4...How do I get it to show the last ticket entered at
the end. The actual database when opened in Access looks fine and
displays the tickets in the order they where entered
(1,2,3...25,26,27). It's only when the "program" displays the records
does it appear the way it does. It's like it reads the last records
first and then the first one on down. Please help!! Thank you!

 
Reply With Quote
 
 
 
 
Gordon Smith \(eMVP\)
Guest
Posts: n/a
 
      14th Jul 2006
ATXTech wrote:
> I am using a Access created database with a program I wrote in C# to
> create and track helpdesk tickets. I store basic stuff like customer
> name, number, issue, tech assigned, etc. with in the database.
>
> **PROBLEM**
> The database worked fine in saving and displaying records until it
> reaced the 26th record. When ever you open the ticket program, it
> retrieves the data from the database on the server and shows the last
> entry in the database first. For example the tickets show like this:
> 28,27,26,1,2,3,4...How do I get it to show the last ticket entered at
> the end. The actual database when opened in Access looks fine and
> displays the tickets in the order they where entered
> (1,2,3...25,26,27). It's only when the "program" displays the records
> does it appear the way it does. It's like it reads the last records
> first and then the first one on down. Please help!! Thank you!


It sounds like you don't have your result set sorted. Saying how to help is
hard since I don't know how exactly you retrieved your result set. If based
off of the base table directly, you need to specify an index to use for
ordering. If based off of a query, you'd want to have an ORDER BY in your
query string. etc.

--
Gordon Smith (eMVP)
-- Avnet Applied Computing Solutions


 
Reply With Quote
 
ATXTech
Guest
Posts: n/a
 
      14th Jul 2006

Gordon Smith (eMVP) wrote:
> It sounds like you don't have your result set sorted. Saying how to help is
> hard since I don't know how exactly you retrieved your result set. If based
> off of the base table directly, you need to specify an index to use for
> ordering. If based off of a query, you'd want to have an ORDER BY in your
> query string. etc.
>
> --
> Gordon Smith (eMVP)
> -- Avnet Applied Computing Solutions


I am just using a basic Access table. I am using customerDataSet,
customersBindingSource, cutomersTableAdapter in C# to load and display
my table. I did see a "sort" property for customerBindingSource and
when I told it to sort by "Ticket ID" (the ticket number) it worked! I
guess since my primary key was "Ticket ID" and it was set to auto
increment, when I told it to sort by that, it sorted them in ascending
order and now it seems to work (or at least with the database on the
local machine). I will put the database back on the server later today
and see what happens. I am asuming that what I did is sort of what you
where saying, either way thank you for your hekp.

 
Reply With Quote
 
BlackWasp
Guest
Posts: n/a
 
      25th Jul 2006
I am guessing this is not just a case of a missing ORDER BY statement in
your SQL statement?

Can you post the code you are using to get the data from Access so we can
comment?


--

BlackWasp
http://www.blackwasp.co.uk/

"ATXTech" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am using a Access created database with a program I wrote in C# to
> create and track helpdesk tickets. I store basic stuff like customer
> name, number, issue, tech assigned, etc. with in the database.
>
> **PROBLEM**
> The database worked fine in saving and displaying records until it
> reaced the 26th record. When ever you open the ticket program, it
> retrieves the data from the database on the server and shows the last
> entry in the database first. For example the tickets show like this:
> 28,27,26,1,2,3,4...How do I get it to show the last ticket entered at
> the end. The actual database when opened in Access looks fine and
> displays the tickets in the order they where entered
> (1,2,3...25,26,27). It's only when the "program" displays the records
> does it appear the way it does. It's like it reads the last records
> first and then the first one on down. Please help!! Thank you!
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Database vba problem SteveMarwood General Software 0 7th Apr 2009 09:32 AM
database access problem soljshavitz@yahoo.com Microsoft ASP .NET 0 20th Aug 2007 06:21 AM
Problem with converting an Access 97 database to Access 2007 =?Utf-8?B?Q1o=?= Microsoft Access 4 24th Feb 2007 11:01 PM
Access Database Problem Tony via AccessMonster.com Microsoft Access 1 5th Oct 2006 07:51 PM
Convert Access XP database to Access 2000 problem =?Utf-8?B?SXNhYWs=?= Microsoft Access 2 18th Apr 2005 02:24 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:48 PM.