473,511 Members | 15,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to find the record no?

5 New Member
hi friends

how to find the record no.. ie what is the location of the particular record in the database.. i dont hav any s.no column in my database.. if a particular record is retrived from the table i have to show its position in the database in my page. can anybody help me? is there any query for this?

thanks in advance
Feb 19 '09 #1
3 2213
Atli
5,058 Recognized Expert Expert
Hi.

How is your table designed? Could we see the CREATE TABLE statement you used?

Rows do not have a default "position" within a table.
If you want to be able to pinpoint a particular row, you will have to add a column that allows you to do so.

Integer Primary Key columns with the Auto_Increment parameter set are very good for this purpose. They give you a row-count of sorts, which you can refer to in other tables and applications.

Like:
Expand|Select|Wrap|Line Numbers
  1. `ID` Int Unsigned Not Null Auto_Increment Primary Key
Feb 20 '09 #2
busybeeitsme
5 New Member
actually i dint create any new table.. currently i am doin a project for an organisation.. already they have the database in ms-access.. and it contains merely 7000 records.. now i ve converted this database to mysql using a software.. in access database they dint have any auto-increment column!! thats is the problem.. so should i include this column in my database???
Feb 22 '09 #3
Atli
5,058 Recognized Expert Expert
That depends on your current table structure.
Is there a primary key?

Try executing this command and posting the results here:
Expand|Select|Wrap|Line Numbers
  1. SHOW CREATE TABLE `<tablename>`;
Where <tablename> is the name of your table.
(If you do this via the mysql CLI client, you can use \G at the end of the query rather than the semi-colon to get a cleaner output.)

This should give you a CREATE TABLE command that can be used to create the table.
Feb 22 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
2557
by: JIMMIE WHITAKER | last post by:
Can someone help on this: I am just learning, and I'm connecting to the the northwindcs.mdf tables / open file is northwindcs.adp. This is the sample installed using msde, which is supposed to be...
10
2818
by: Andrei Ivanov | last post by:
Hello, it seems my postgresql data has somehow become corrupted (by a forced shutdown I think): psql template1 -U shadow Password: ERROR: nodeRead: did not find '}' at end of plan node...
2
14886
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data...
3
6202
by: Randy | last post by:
I have been able to set up a Find Record Button on my switchboard to take me to a form with the correct case number by using a parameter query and macro. When I try to run the Find Record button...
1
2825
by: Jim Heavey | last post by:
Hello, I am running into something strange. I am getting the following error when the program attempts to execute a particular procedure: An unhandled exception of type...
4
2603
by: Aaron Smith | last post by:
Dim dv As DataView = New DataView(FacilitiesDS1.Facilities, "", "ID ASC", DataViewRowState.CurrentRows) Dim iPos As Integer = dv.Find(dr.Item("ID")) Me.BindingContext(FacilitiesDS1,...
3
2732
by: sean | last post by:
I have a table with fixed row of records SORTED by DATE using ADO pagination method. The user can click a link in one table cell and go to another page to modify the record. Once the updated record...
7
4529
by: john | last post by:
In my form I have a master table and a details table linked 1xM. I can search through the whole parent table but I also like to be able to search through the child table fields to find parent...
1
2560
by: farhan31 | last post by:
Hello all I have Two tables.Table 1 and table 2.Table 1 has one to many relation with Table 2.I have one main form Form1 based on table 1.On form 1 i have a sub form based on table 2.I have put a...
1
3317
Run2Eat
by: Run2Eat | last post by:
i feel like this is a doofus question... but i've created an access form and added a find record button, but when i use the form, the find record button searches the form itself, not the table. all...
0
7252
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
7153
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
7432
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...
0
5676
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,...
1
5077
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...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1583
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 ...
0
452
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...

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.