Click here to Skip to main content
16,014,759 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Data List Delema Pin
Scott Serl12-Jun-05 0:38
Scott Serl12-Jun-05 0:38 
GeneralEXPORTING CRYSTAL REPORTS! HELP ME! PLEASE! Pin
mizu_chil11-Jun-05 15:46
mizu_chil11-Jun-05 15:46 
GeneralRe: EXPORTING CRYSTAL REPORTS! HELP ME! PLEASE! Pin
Yulianto.12-Jun-05 22:10
Yulianto.12-Jun-05 22:10 
GeneralRe: EXPORTING CRYSTAL REPORTS! HELP ME! PLEASE! Pin
Anonymous13-Jun-05 2:18
Anonymous13-Jun-05 2:18 
GeneralRe: EXPORTING CRYSTAL REPORTS! HELP ME! PLEASE! Pin
Yulianto.13-Jun-05 16:59
Yulianto.13-Jun-05 16:59 
QuestionAdd DLL reference during runtime? Pin
Chemisus11-Jun-05 8:32
Chemisus11-Jun-05 8:32 
AnswerRe: Add DLL reference during runtime? Pin
S. Senthil Kumar12-Jun-05 5:53
S. Senthil Kumar12-Jun-05 5:53 
GeneralAuto Number Generator Pin
LordLothar11-Jun-05 5:41
LordLothar11-Jun-05 5:41 
PeriodAdapter.Fill(DataSet11, "period")
Dim datatable As DataTable = DataSet11.Tables("Period")
Dim dr As DataRow = datatable.NewRow

Dim r() As DataRow = datatable.Select("periodno= max(periodno)")
Dim i As Integer

For i = 0 To r.Length - 1
dr("periodno") = CInt(r(i)("periodno")) + 1
dr("begindate") = DateTimePicker1.Value.Date
dr("enddate") = DateTimePicker2.Value.Date
datatable.Rows.Add(dr)

Next
MsgBox("New period has been saved", MsgBoxStyle.Information, "New Period")
PeriodAdapter.Update(DataSet11, "period")
--------------------------
Well i havent search from internet about this fucntion yet and above code is just what i modify a bit and use for generate new id or number to my record by adding 1. The problem is if there are not records at database, above code cannot add the first record let said periodno =1 ........... and keep giving blank record when i see at my database. if i manually insert periodno=1 then above code can give the next periodno=2.

How to make condition if my database is empty, i tried use Nothing syntax also cannot. What should i do....
GeneralRe: Auto Number Generator Pin
Robert Rohde11-Jun-05 20:37
Robert Rohde11-Jun-05 20:37 
GeneralPassword protected folder Pin
Rizwan Bashir11-Jun-05 2:50
Rizwan Bashir11-Jun-05 2:50 
GeneralRe: Password protected folder Pin
Dave Kreskowiak11-Jun-05 3:15
mveDave Kreskowiak11-Jun-05 3:15 
Generaltext to image Pin
Rizwan Bashir11-Jun-05 2:04
Rizwan Bashir11-Jun-05 2:04 
GeneralRe: text to image Pin
S. Senthil Kumar12-Jun-05 5:55
S. Senthil Kumar12-Jun-05 5:55 
GeneralString Encryption. [VB6] Pin
Smurg11-Jun-05 0:41
Smurg11-Jun-05 0:41 
Generalput Flash into form Pin
GaryKoh11-Jun-05 0:12
GaryKoh11-Jun-05 0:12 
GeneralRe: put Flash into form Pin
KaptinKrunch12-Jun-05 15:46
KaptinKrunch12-Jun-05 15:46 
GeneralRe: put Flash into form Pin
kevinssi12-Jun-05 22:04
kevinssi12-Jun-05 22:04 
QuestionHow to save latest input? Pin
LordLothar10-Jun-05 20:31
LordLothar10-Jun-05 20:31 
AnswerRe: How to save latest input? Pin
Yulianto.10-Jun-05 20:55
Yulianto.10-Jun-05 20:55 
AnswerRe: How to save latest input? Pin
syed saba10-Jun-05 20:55
syed saba10-Jun-05 20:55 
GeneralRe: How to save latest input? Pin
LordLothar11-Jun-05 5:50
LordLothar11-Jun-05 5:50 
GeneralRe: How to save latest input? Pin
MohammadAmiry12-Jun-05 23:42
MohammadAmiry12-Jun-05 23:42 
GeneralRe: How to save latest input? Pin
LordLothar13-Jun-05 2:53
LordLothar13-Jun-05 2:53 
GeneralSimple? Problem Pin
Lordahdaring10-Jun-05 18:32
Lordahdaring10-Jun-05 18:32 
GeneralRe: Simple? Problem Pin
Dave Kreskowiak11-Jun-05 3:10
mveDave Kreskowiak11-Jun-05 3:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.