No one have sufficient time to teach a new one. Read books, journals or from MSDN and also learn form teaching concerns and socities. Forum members can help you to correct your learnings and ways by making some fruitful tips. Achievement is your concern.
Now I am describing here how to Connect,Open and Close an Access Database, through a simple codification.
Imports System.Data.OleDb Public Class Form1 'Declaring variables Dim MyConn As New System.Data.OleDb.OleDbConnection Dim dirty As Boolean = False Private Sub OpenConnection() 'Checking here, whether Database Connection is open or not 'If it is opened then try to close it If MyConn.State = ConnectionState.Open Then MyConn.Close() 'Assigning ConnectionString Property MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyProject\XXX.mdb" 'Open it MyConn.Open() dirty = True End Sub Private Sub OpenConnectionButton_Click(sender As System.Object, e As System.EventArgs) Handles OpenConnectionButton.Click 'Open the connection Select Case MyConn.State Case ConnectionState.Closed : Me.OpenConnection() Case Else : MsgBox("Connection is already opened.") End Select End Sub Private Sub CloseConnectionButton_Click(sender As System.Object, e As System.EventArgs) Handles CloseConnectionButton.Click Select Case MyConn.State Case ConnectionState.Open : MyConn.Close() Case Else : MsgBox("Connection is already closed.") End Select dirty = False End Sub Private Sub Form1_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing 'Checking Finally at the time of closing the form If dirty Then Select Case MessageBox.Show("Do you sure to close the connection?", "Connection...", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) Case Windows.Forms.DialogResult.OK MyConn.Close() dirty = False e.Cancel = False Case Else e.Cancel = True End Select End If End Sub Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load End Sub End Class
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
Hi. so this is actually a continuation from another question of mineHere but i was advised to start a new thread as the original question was already answered.
This is the result of previous question answered :
code for the listbox - datagridview interaction
At the top of the code ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...