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.
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...