473,406 Members | 2,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

C# + Access Database Problem

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!

Jul 13 '06 #1
3 2181
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
Jul 13 '06 #2

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.

Jul 14 '06 #3
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" <TS******@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
>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!

Jul 25 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: lappy | last post by:
Hello, I have written a small programme to compact an access 97 database. Dim je As New JRO.JetEngine ' Compacts database Data.Mdb to Data2.mdb. je.CompactDatabase...
16
by: Orchid | last post by:
Hello, I have a MS. Access database in XP. When I open the database in design view, users will get an error message & cannot even open the database. Is there any way to solve this problem? ...
3
by: Willie | last post by:
Greeings all, I am unable to complete adding a Data Adapter to my application in VB .net. 1) I drag the adapter on to the form, 2) I select 'New Connection,' connect to the database table using...
15
by: philip | last post by:
On a form, I have a datagridview. This datagridview is constructed on a dataset filled by a tableadapter. The table adapter do very well what it must do when filling dataset. Insertions,...
18
by: surfrat_ | last post by:
Hi, I am having the following problems in getting Microsoft Visual Studio 2005 Professional to link to an Access .mdb database. Please help me to sort this out. Problem 1: The Microsoft...
4
by: Hepburn08 | last post by:
Hi, I need some help opening a corrupt Microsoft Access database file. I get an error message that says "unrecognized database format". Since I can't open it, I can't export the data to another new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.