Posted on April 5, 2010 Leave a Comment
Option Strict Off Option Explicit On Friend Class frmSQL Inherits System.Windows.Forms.Form #Region “Windows Form Designer generated code ” Public Sub New() MyBase.New() If m_vb6FormDefInstance Is Nothing Then If m_InitializingDefInstance Then m_vb6FormDefInstance = Me Else Try ‘For the start-up form, the first instance created is the default instance. If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then m_vb6FormDefInstance = Me […]
Posted on April 5, 2010 1 Comment
Private Sub UploadedFiles_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles UploadedFiles.DoubleClick ‘ ‘ Downloads the selected file and displays it in the picture box. ‘ ‘ ‘ Finds the unique id of the file. ‘ Dim drv As DataRowView = CType(UploadedFiles.SelectedItem, DataRowView) Dim selectedText As String = drv.Row(“Name”).ToString() Dim id As Long=-1 ‘ ‘ […]
Posted on April 5, 2010 Leave a Comment
Private Sub btnConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConnect.Click Try ConnectionString = “Data Source= ” + txtdatasource.Text + “;Initial Catalog=” + txtinitialcat.Text + “;Integrated Security=SSPI;User ID=sa;Password=test;Connection Timeout=60” MessageBox.Show(ConnectionString) Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub
Posted on April 5, 2010 Leave a Comment
Private Sub btnUpdateFact_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdateFact.Click try Dim sqlupdatetable As String Dim counter As Integer counter = 0 If (btnUpdateFact.Text = “Update Facts”) Then btnAddFact.Enabled = False If (cbFTableName.SelectedIndex = -1) Then MessageBox.Show(“Please select a Table Name to update”, “Information”, MessageBoxButtons.OK, MessageBoxIcon.Information) Exit Sub End If cmd.Connection = New […]
Posted on April 5, 2010 1 Comment
Private Sub btnCreateFact_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreateFact.Click Try Dim tblerror As String tblerror = “” If (cbFTableName.SelectedIndex = -1) Then tblerror = “Please select a Table Name” End If If ((tblerror.Length > 0)) Then MessageBox.Show(tblerror + vbCrLf, “Information”, MessageBoxButtons.OK, MessageBoxIcon.Information) Exit Sub End If cmd.Connection = New System.Data.SqlClient.SqlConnection(ConnectionString) cmd.Connection.Open() sql […]
Posted on April 5, 2010 Leave a Comment
Private Sub btnUpdateDim_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdateDim.Click Try Dim sqlupdatetable As String Dim counter As Integer counter = 0 If (btnUpdateDim.Text = “Update Dimensions”) Then btnAdd.Enabled = False txtUnique.Enabled = False cbTypeUnique.Enabled = False txtPK.Enabled = False txtValUnique.Enabled = False If (cbTableName.SelectedIndex = -1) Then MessageBox.Show(“Please select a Table Name […]
Posted on April 5, 2010 Leave a Comment
Private Sub btnCreateDim_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreateDim.Click Try Dim tblerror, unqerror, pkerror, valerror As String tblerror = “” unqerror = “” pkerror = “” valerror = “” Dim sqlcmd As System.Data.SqlClient.SqlCommand Dim sqladd As System.Data.SqlClient.SqlCommand If (cbTableName.SelectedIndex = -1) Then tblerror = “Please select a Table Name” End If If […]