i have a serial id, and i should fix that only 100 entries are allowed.How can i do this by code? and also how can i automatically generate consecutive numbers i.e from 1 to 100.Please help me frnds.I have to complete my project soon.
You haven't given us much to go on. I assume this application involves a database. If so you haven't said what type. Typically, if you want to get the next available value in a field you use the MAX function, then add one. Also, you'll have to get the number of entries already in the database because you have a limit of 100. To get the number of entries you can do
SELECT COUNT(*) FROM myTable
Once you have verified that you have space for another entry you can generate the next serialID by
I can't say specifically for ADODC but using ADODB it looks like this
Dim con As New ADODB.Connection
Dim rec As New ADODB.Recordset
rec.Open("SELECT COUNT(*) FROM authors", con, CursorTypeEnum.adOpenStatic)
MsgBox("NUMBER OF RECORDS = " & rec(0).Value)
Note that this uses a connection string for SQLEXPRESS. You would have to change that to the connection string for Oracle. I don't have Oracle installed so I cannot test this.
I Developed application in C# with crystal reports and created setup file in third party (Advance) Installer.When i installed my application on client system application is working but ...