How to use a database?
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
Hello guys,
A few months ago a friend of my ask me to create a tutorial for working with a database
well i know it can be done with several ways
but i love this way because it easy to work with.
i use a .mdb file protexted with password
you can use one without password that up to you
i use ms offfice 2007
first of al you need a module file:
this code you need to add.
i don't gonna add all the code here because its taking me a long time to add this and explain it
so here you can download the source.
good luck
Dummy1912
A few months ago a friend of my ask me to create a tutorial for working with a database
well i know it can be done with several ways
but i love this way because it easy to work with.
i use a .mdb file protexted with password
you can use one without password that up to you
i use ms offfice 2007
first of al you need a module file:
this code you need to add.
Code: Select all
Option Explicit On
Imports System.Data
Imports System.Data.OleDb
Imports Microsoft.Win32
Imports System
Imports System.IO
Module Module1
Public EditFrm As New EditFrm
Public strSql As String
Public ConBill As New ADODB.Connection
Public RsBill As New ADODB.Recordset
Public RLArrayBill(0, 0) As String
Public RLRnoBill(0) As Integer
Public ReminderCountBill As Integer
Public ContactListArrayBill(0, 0) As String
Public ContactCountBill As Integer
Public blnEditContactsBill As Boolean
Public intRecordNoBill As Integer
Public Sub OpenConBill()
ConBill.CursorLocation = ADODB.CursorLocationEnum.adUseClient
'Here we only gonna changed the name of the database and password
ConBill.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Replace(Application.StartupPath, "bin", "") & "\DDB.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False;User Id=admin;Jet OLEDB:Database Password=lopulopu"
'if your database has no password you should use this: password;"
ConBill.Open()
RsBill.CursorType = ADODB.CursorTypeEnum.adOpenStatic
RsBill.LockType = ADODB.LockTypeEnum.adLockBatchOptimistic
End Sub
Public Sub CheckConBill()
If ConBill.State = 0 Then Call OpenConBill()
End Sub
Public Sub CloseConBill()
If ConBill.State = 1 Then
ConBill.Close()
End If
End Sub
Public Function FixQuotesBill(ByVal thestring)
FixQuotesBill = Replace(thestring, "'", "''")
End Function
Code: Select all
#Region "Here i load everything needed in the ListView"
Public Sub InitBill()
Dim i As Integer
'Here I load the database with the name of the table (mainpage)
RsBill.Open("Select * from MainPage where id=" & intRecordNoBill, ConBill)
ReminderCountBill = RsBill.RecordCount
If ReminderCountBill > 0 Then
ReDim RLArrayBill(ReminderCountBill, 9)
ReDim RLRnoBill(ReminderCountBill)
With RsBill
'Hier zet ik alle waarden die in de mainpage zitten
For i = 0 To ReminderCountBill - 1
RLArrayBill(i, 1) = .Fields!name.Value
RLArrayBill(i, 2) = .Fields!firstname.Value
RLArrayBill(i, 0) = .Fields!id.Value
RLRnoBill(i) = .Fields!id.Value
.MoveNext()
Next
End With
End If
RsBill.Close()
End Sub
#End Region
End Module
i don't gonna add all the code here because its taking me a long time to add this and explain it
so here you can download the source.
good luck
Dummy1912
You do not have the required permissions to view the files attached to this post.
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Nice tutorial
But I don't work with databases often because thats boring programming :P

But I don't work with databases often because thats boring programming :P
Axel wrote:Nice tutorialhello buddy![]()
But I don't work with databases often because thats boring programming :P
i understand

and thanks
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
The way you use databases looks far different than [urlhttp://homeandlearn.co.uk/NET/nets12p1.html]my way[/url].
Where did you learn your way? Like, from a website? YouTube video? Yourself?
It looks like good coding, and great code per se, so nice job. cooll;
Where did you learn your way? Like, from a website? YouTube video? Yourself?
It looks like good coding, and great code per se, so nice job. cooll;
GoodGuy17 wrote:The way you use databases looks far different than [urlhttp://homeandlearn.co.uk/NET/nets12p1.html]my way[/url].
Where did you learn your way? Like, from a website? YouTube video? Yourself?
It looks like good coding, and great code per se, so nice job. cooll;
i learn from some friends
so i personally think this way is easier then that way you showed me.
but it works thats the point

visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Hey Tim,
Thanks I neither know much about database lol, but I will probable learn something now
Keep it up cooll;
Thanks I neither know much about database lol, but I will probable learn something now

Keep it up cooll;
thanks agust (buddy)
ill try
ill try

visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Thanks for posting 
I really was hoping you were gonna post this

I really was hoping you were gonna post this

LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
![Image]()
![Image]()
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!

this is only for windows ms access, which i never tried, but is it secure to make the connection?
Connecting to mysql database isn't hard, i managed to make one, but closed it after realizing that its not safe.
Also, you need a remote database(not all hosts give that).
Connecting to mysql database isn't hard, i managed to make one, but closed it after realizing that its not safe.
Also, you need a remote database(not all hosts give that).
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
Copyright Information
Copyright © Codenstuff.com 2020 - 2023