Database Application
Language:
Visitors have accessed this post 14947 times.
this is just a simple database query developed during my lunch break =)
hope u like it =)
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
Comments
Anonymous (not verified)
Tue, 02/02/2010 - 11:01
Permalink
hi..
can u please teach me how to work with ado in my program??/
ced
Fri, 02/05/2010 - 10:58
Permalink
sure
activex design object :) sa VB ba? kasi pwede rin ADO sa .net
charle2364
Wed, 01/13/2010 - 12:19
Permalink
hi
sir cedrick, i kinda like your post, it fits on my current project.. i am new in VB.net and still studying it. i quoted the code here:
rs = New ADODB.Recordset
rs.Open("Select * from administrator", cnstring, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockOptimistic)
rs.AddNew()
rs("username").Value = txtusername.Text
rs("password").Value = txtpassword.Text
rs.Update()
MsgBox("Save!", MsgBoxStyle.Information, "Save")
txtpassword.Text = ""
txtusername.Text = ""
gridview1.Refresh()
i just want to ask what is the meaning of this line:
rs = New ADODB.Recordset
rs.Open("Select * from administrator", cnstring, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockOptimistic)
thanks alot!
Anonymous (not verified)
Wed, 01/13/2010 - 13:13
Permalink
im also new in vb.net hehehe
i just transferd mah code in vb 6 to .net
but anyways...
in this line
rs = New ADODB.Recordset
rs.Open("Select * from administrator", cnstring, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockOptimistic)
the recordset open and select what table(administrator table) to be used =)
Anonymous (not verified)
Mon, 01/04/2010 - 13:16
Permalink
cocoment
woe tnx sir for the comment =)
but i prefared using recordset in inserting records but anyways this is just an example of my work. Yes, thanks for the info that OleDbCommand parameters reduce SQL injection attacks. Im just new hir so I need your help in programming =)
Anonymous (not verified)
Thu, 12/31/2009 - 16:41
Permalink
i agreed with sir
i agreed with sir arjay..
Happy new year
arjay_nacion
Tue, 12/29/2009 - 05:38
Permalink
Interop COM with .NET
I have reviewed your code.
It's nice but there is a problem with interacting COM objects with .NET objects.
In your example, you interopped Microsoft ActiveX DataObjects with your .NET application. Microsoft ActiveX Data Object is a COM library.
As we all know, much of the previous COM implementations (VB6, VC++6 etc) had been replaced or updated when .NET was introduced.
So instead of creating an ADODB.Recordset object for Inserting new records,
you can just use OleDbCommand to the the record insertion.
Example:
Using cmd as New OleDbCommand
cmd.Connection = conn
cmd.CommandText = "Insert into table SET column [email protected]"
cmd.Parameters.Add("@value", OleDbType.Varchar).Value = value
cmd.ExecuteNonQuery()
End Using
Also using OleDbCommand parameters reduce SQL injection attacks, which makes your application safer.
Although COM and .NET interop is possible, for optimization, if it is possible in .NET, do it in .NET.
jaysfall
Wed, 01/20/2010 - 19:27
Permalink
RE:Interop COM with .NET
i agreed with you bro..
we can use dis instead of adodb.recordset.
for me, i prefer, odbcconnection than oledbconnection
for example..
import system.data.odbc
Dim myconnection = New System.Data.Odbc.OdbcConnection("dsn=SampleDatabase")
dim myRecordset as new odbcConnection
with myRecordset
.connection=myconnection
.commandText="Insert into tblname(Fname)values(''"& txtFname.text &"')
.executeNonQuery()
End with
thats it!So simple..No need of any adds-on References.hehe
GodBless
Consultant / .Net Developer
::[email protected]::
+09059769698
ced
Thu, 01/21/2010 - 13:27
Permalink
corek corek
actually ur both correct guys.. where in vb.net so well gonna use ADO.net
ill just post this code because some user ask me ho to use ADO (ADODB.recordset) in inserting records.. so this was just a help =) hehehe
soon ill post my latest project =) Quiz Bee system
prettyghie28L
Tue, 03/11/2014 - 01:11
Permalink
where is your quiz bee system
where is your quiz bee system?is it vb.net 2010 and ms access? is it server and client? coz i need something like that :)
margarette laroa
Add new comment