Hi
I am a VB coder and am starting lately to program with .net.
There is something i could do in VB that i don't know how in vb.net.
this is it:
This code selects the maximum sequence and checks out if it is 1 or more. If more then adds it up by one using rs that refers to this max(sequence).
What i need to do is how can i refer to max(sequence) in VB.net. i need this piece of code implemented in VB.net ..do i use rs? and how?
pls, this is so urgent..
i'd appreciate any help.
thanks
I am a VB coder and am starting lately to program with .net.
There is something i could do in VB that i don't know how in vb.net.
this is it:
VB.NET:
Global rs1 As ADODB.Recordset
MySelect = "select max(sequence) from table1 where fullid='" & FullID & "'"
Set rs2 = New ADODB.Recordset
rs2.Open MySelect, cn2
If rs2.EOF Or IsNull(rs2(0)) Then
sequence= 1
Else
sequence= rs2(0) + 1
End If
and then insert statement
With CMD1
.CommandText = MyInsert
.Execute
End With
This code selects the maximum sequence and checks out if it is 1 or more. If more then adds it up by one using rs that refers to this max(sequence).
What i need to do is how can i refer to max(sequence) in VB.net. i need this piece of code implemented in VB.net ..do i use rs? and how?
pls, this is so urgent..
i'd appreciate any help.
thanks