Click here to Skip to main content
15,896,063 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to add a contact in google contacts from vb 2010 Pin
_nixz_7-Oct-18 22:04
_nixz_7-Oct-18 22:04 
AnswerRe: How to add a contact in google contacts from vb 2010 Pin
Richard MacCutchan7-Oct-18 22:57
mveRichard MacCutchan7-Oct-18 22:57 
GeneralRe: How to add a contact in google contacts from vb 2010 Pin
_nixz_9-Oct-18 3:06
_nixz_9-Oct-18 3:06 
QuestionCreating random access file with visual basic.net Pin
Member 139824717-Oct-18 11:48
Member 139824717-Oct-18 11:48 
AnswerRe: Creating random access file with visual basic.net Pin
Richard MacCutchan7-Oct-18 21:57
mveRichard MacCutchan7-Oct-18 21:57 
QuestionProblem with System.Text.Encoding, Solved Pin
mo14923-Oct-18 11:58
mo14923-Oct-18 11:58 
AnswerRe: Problem with System.Text.Encoding, Solved Pin
Eddy Vluggen4-Oct-18 2:15
professionalEddy Vluggen4-Oct-18 2:15 
QuestionCheck for changes on Windows form Pin
wjburke22-Oct-18 11:59
wjburke22-Oct-18 11:59 
I am trying to simulate the isdirty feature from Access. I want to check and see if anything has changed so I can prompt the user to save their work or lose it. So far I have written a subroutine that backs up the data in the form. But I am having problems with the code for the compare when they try and exit. So how do I compare the data I stored in the dataset with what is on the form?

    Imports System.Data.SqlClient

    Public Class Form1
    Dim dsShiftLog As DataSet = New DataSet("ShiftLog")

   Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Me.Shift_PrintersTableAdapter.Fill(Me.LazerMaintenanceDataSet.Shift_Printers)
        Me.Shift_LogTableAdapter.Fill(Me.LazerMaintenanceDataSet.Shift_Log)

        Backup_data(tbShift_Key.Text)

   End sub

Private Sub Backup_data(ShiftKey As Integer)

        Dim table1 As DataTable = New DataTable("shiftlog")
        Dim strSql As String = "SELECT * FROM Shift_Log WHERE Shift_Log.Shift_Key = '" & ShiftKey & "';"
        'Dim dtb As New DataTable
        Using SqlConn As New SqlConnection(My.Settings.LazerMaintenanceConnectionString)
            SqlConn.Open()
            Using da As New SqlDataAdapter(strSql, SqlConn)
                da.Fill(table1)
            End Using
            SqlConn.Close()
        End Using

        Dim table2 As DataTable = New DataTable("shiftprinters")
        strSql = "SELECT * FROM Shift_Printers WHERE Shift_Printers.Shift_Key = '" & ShiftKey & "';"
        'Dim dtb As New DataTable
        Using SqlConn As New SqlConnection(My.Settings.LazerMaintenanceConnectionString)
            SqlConn.Open()
            Using da2 As New SqlDataAdapter(strSql, SqlConn)
                da2.Fill(table2)
            End Using
            SqlConn.Close()
        End Using

        dsShiftLog.Tables.Add(table1)
        dsShiftLog.Tables.Add(table2)


    End Sub

AnswerRe: Check for changes on Windows form Pin
Eddy Vluggen2-Oct-18 21:49
professionalEddy Vluggen2-Oct-18 21:49 
SuggestionRe: Check for changes on Windows form Pin
Richard Deeming3-Oct-18 1:47
mveRichard Deeming3-Oct-18 1:47 
QuestionRe: Check for changes on Windows form Pin
dan!sh 3-Oct-18 2:09
professional dan!sh 3-Oct-18 2:09 
QuestionIndex and length must refer to a location within the string vb.net Pin
Victoryy Hisar Sitanggang2-Oct-18 4:14
Victoryy Hisar Sitanggang2-Oct-18 4:14 
AnswerRe: Index and length must refer to a location within the string vb.net Pin
Richard Deeming2-Oct-18 4:34
mveRichard Deeming2-Oct-18 4:34 
QuestionRegisterHotKey Pin
JR2122-Oct-18 1:58
JR2122-Oct-18 1:58 
AnswerRe: RegisterHotKey Pin
JR2126-Oct-18 12:53
JR2126-Oct-18 12:53 
QuestionProblems with SSLstream.Read (VB.NET/VS2017) Pin
Member 1185690428-Sep-18 21:58
Member 1185690428-Sep-18 21:58 
QuestionProblem with SHGetFolderPath(): Problem Closed. Pin
mo149228-Sep-18 11:30
mo149228-Sep-18 11:30 
AnswerRe: Problem with SHGetFolderPath(): Problem Closed. Pin
Richard MacCutchan28-Sep-18 21:45
mveRichard MacCutchan28-Sep-18 21:45 
GeneralRe: Problem with SHGetFolderPath(): Problem Closed. Pin
mo149228-Sep-18 23:44
mo149228-Sep-18 23:44 
SuggestionRe: Problem with SHGetFolderPath(): Problem Closed. Pin
Richard Deeming1-Oct-18 8:13
mveRichard Deeming1-Oct-18 8:13 
GeneralRe: Problem with SHGetFolderPath(): Problem Closed. Pin
mo14921-Oct-18 9:45
mo14921-Oct-18 9:45 
Questionhow to get corresponding values of particular column from database to text field Pin
Member 1400114828-Sep-18 5:45
Member 1400114828-Sep-18 5:45 
AnswerRe: how to get corresponding values of particular column from database to text field Pin
Richard MacCutchan28-Sep-18 6:14
mveRichard MacCutchan28-Sep-18 6:14 
AnswerRe: how to get corresponding values of particular column from database to text field Pin
Eddy Vluggen28-Sep-18 6:38
professionalEddy Vluggen28-Sep-18 6:38 
QuestionScreen size and form size Pin
desanti27-Sep-18 18:58
desanti27-Sep-18 18:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.