473,394 Members | 1,785 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,394 software developers and data experts.

get last ID from database access

1
hi
i use this code :

Expand|Select|Wrap|Line Numbers
  1. str1 = "select ID from Album";
  2.             com = new OleDbCommand(str1, con);
  3.             OleDbDataReader reader1 = com.ExecuteReader();
  4.             reader1.Read();
  5.             label2.Text = reader1["ID"].ToString() + "   picture";
butt read ID number 1 ... i want get last ID ?
please help !
Aug 13 '14 #1
0 1178

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

Similar topics

1
by: Limey | last post by:
Hi All, I want to write an application that will talk to a RDBMS. The application needs to be platform neutral from both an operating system and database backend point of view. I have...
49
by: Relaxin | last post by:
It is just me or has MS created some of the worst ways to access and display data? You can use a DataSet, but if you want to sort or filter the data to must use a DataView which is created from...
1
by: Ron L | last post by:
I am trying to setup a solution that will include a client which will access a database via remoting calls. I am hosting my remoting project in IIS, and am using Windows Integrated security. ...
4
by: Shawn H. Mesiatowsky | last post by:
I have a strange problem here. I have my development computer with IIS installed, and we have a SQL server as well on a windows 2000 server. both are members of a domain. I have restricted access...
4
by: Val P | last post by:
How does everyone design the database access layer in an asp.net application? Two options that come to mind is: 1. create a database class and instanciate it as needed, local to a function or...
2
by: williamphenryjr | last post by:
This is a long post. If you have answers I'm ready. If you have web links, that'd be great too. I'm a Junior/Senior in Computer Science at Washington State University, so you can make some...
5
by: Macca | last post by:
Hi, I have a multithreaded app which now needs database storage. I am in the process of designing my Data Access Layer but and was wondering what issues I should look for for in regards to a...
7
by: =?Utf-8?B?Um9nZWxpbw==?= | last post by:
hey, I have 2 threads, th and th2, both of them run a method. each of these 2 methods requires database access. sometimes I get an error, that database requires an open connection, and that...
4
by: mlmn | last post by:
I bought an IBM USB Fingerprint reader. I want to use it to authenticate a user for database access. When some one tries to access a database, his ID should be provided and then his fingerprint...
0
Kosal
by: Kosal | last post by:
Hi Please help me to create AdRotator using Database Access in ASP.NET if everyone can because I don't know how to create table AdList in access and how to contect to access and get data from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.