This article consists of video clips that guide you to create Crystal Report for Visual Basic 2008 using ADO.Net data source and Microsoft Access Database.
Read More…
This article consists of video clips that guide you to create Crystal Report for Visual Basic 2008 using ADO.Net data source and Microsoft Access Database.
Read More…
This article shows you how to write Visual Basic code using ADO.Net to manipulate data with Microsoft Access 2003 format. From this article you will know how to:
How to show Open With dialog in Visual Basic .Net 2008? Please click here for more detail!

Please follow the instruction below:

Dim Cnn As New OleDb.OleDbConnection(“Provider=Microsoft.ACE.OLEDB.12.0; “ & _
“Data Source=C:\data.accdb; Persist Security Info=False;”)
Cnn.Open()
Before using the above code, please download and install AccessDatabaseEngine first.
Here is the link you can download:
http://www.microsoft.com/downloads/details.aspx?familyid=7554f536-8c28-4598-9b72-ef94e038c891&displaylang=en
Declare search_value As String
Declare n As Integer
Input n
Declare list(1 to n) As String
Input search_value
Declare i As Integer
For i=0 to n-1 Increased by 1
Input list(i)
End For
Declare start_index As Integer
Declare end_index As Integer
Declare mid_index As Integer
Declare found_index As Integer
Set start_index=1
Set end_index=n
Set found_index = -1
Do
mid_index = (Round Down) (start_index+end_index)/2
If end_index<=start_index Then
If search_value = list(mid_index) Then
found_index = mid_index
End If
Exit Do
Else
If search_value = list(mid_index) Then
found_index = mid_index
Exit Do
Else If search_value < list(mid_index) Then
end_index = mid_index – 1
Else
start_index = mid_index + 1
End If
End If
End Do Loop
If found_index = -1 Then
Display “Search not found!”
End If
Output found_index
(Reference: http://www.krookroo.com/programming-languages/ms-visual-basic-20052008/94-it-vb9-10.html)
អានលម្អិតខាងក្រោម
http://www.krookroo.com/programming-languages/ms-visual-basic-20052008/92-it-vb9-9.html
Dim ExcelApp As Object, ExcelBook As Object
Dim ExcelSheet As Object
Dim i As Integer
Dim j As Integer
‘create object of excel
ExcelApp = CreateObject(“Excel.Application”)
ExcelBook = ExcelApp.WorkBooks.Add
ExcelSheet = ExcelBook.WorkSheets(1)
With ExcelSheet
For i = 1 To Me.DataGridView1.RowCount
.cells(i, 1) = Me.DataGridView1.Rows(i – 1).Cells(“id”).Value
For j = 1 To DataGridView1.Columns.Count – 1
.cells(i, j + 1) = DataGridView1.Rows(i – 1).Cells(j).Value
Next
Next
End With
Dim con As New OleDb.OleDbConnection
con.ConnectionString = “Provider=Microsoft.Jet.OLEDB.4.0; Data Source=” & _
Application.StartupPath & “\dbstudent.mdb;” & _
“Jet OLEDB:Database Password=12345″
con.Open()
‘———————-
Dim da As New OleDb.OleDbDataAdapter(“SELECT * FROM tblstudent”, con)
‘———-
con.Close()
con.Dispose()
http://www.krookroo.com/programming-languages/ms-visual-basic-20052008/87-it-vb9-8.html
Public pubCnn As New OleDb.OleDbConnection
Public strCnn As String = “Provider=SQLOLEDB.1; Data Source=.; ” & _
” Initial Catalog=SCHOOLSTAT; User ID=sa; Password=;”

អានព័ត៌មានលម្អិតនៅក្រោមនេះ
http://www.krookroo.com/programming-languages/ms-visual-basic-20052008/84-it-vb8-7.html