This is a Visual Basic Code using stored procedure:
DE.dbo__Show_XRayMaintenance
If DE.rsdbo__Show_XRayMaintenance.RecordCount = 0 Then
Me.txtid.Text = "XRAY-0001"
Else
DE.dbo__MAX_XRayMaintenance
aID = Val(Right(DE.rsdbo__MAX_XRayMaintenance.Fields(0), 4))
ID = Mid(Str(aID + 1), 2)
If Len(ID) = 1 Then
Me.txtid.Text = "XRAY-000" + ID
ElseIf Len(ID) = 2 Then
Me.txtid.Text = "XRAY-00" + ID
ElseIf Len(ID) = 3 Then
Me.txtid.Text = "XRAY-0" + ID
ElseIf Len(ID) = 4 Then
Me.txtid.Text = "XRAY-" + ID
End If
DE.rsdbo__MAX_XRayMaintenance.Close
End If
can someone please help me on how to convert this code using vb 2008 even with out using stored procedure..not really to convert the code..just want to get the same output as vb6 produce.thanks
- 3 views