Loading

can some pls give me an idea about this one

1 post / 0 new
Offline
Joined: 11/09/2009
can some pls give me an idea about this one

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

Add new comment

Filtered HTML

  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.