473,809 Members | 2,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2197
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 ,
customersBindin gSource, cutomersTableAd apter in C# to load and display
my table. I did see a "sort" property for customerBinding Source 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.goo glegroups.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
2975
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 "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\Dump\DataOld.Mdb", _ "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\Dump\Data.Mdb"
16
2655
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? Thanks for your help in advance. Orchid
3
1235
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 Jet 4.0, then test connection....to this point I am good. 3) Next Page, I use SQL Statements 4) I use the Query Builder, select the table I need, then click next... 5) Then I get the following error message: The wizard detected the...
15
2566
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, modifications and deletions functions very well in the dataset. But impossible to transmit modifications in ACCESS database. Impossible to WRITE in database. Here is the code for data transmission from tableadapter to Access database :
18
9159
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 page "How to: Connect to Data in an Access Database"
4
18036
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 database. I thought some of you gurus might have some help (yes, I have a backup but it was from a couple of months ago and I updated it since.) Thanks
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9601
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10378
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10115
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9198
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3013
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.