SQL Connection and Commands

Submitted by: 
Visitors have accessed this post 17058 times.

Salam to all:
I creat this application in VB.NET 2008 using SQL server 2008. By this application you can learn SQL Connection and (Add, Delete, Update , Search etc) commnds.

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.


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.


very useful for both students and others

Kennedy Oyoo

Sorry my friends.... Its been long time that i came back to this site again with new ideas and new programming techniques. If u people have any problem with my programming u can contact me at ([email protected]om , [email protected] , Skype mark.mai50 or Mobile, +447425251586)
Thanx all my dear friends.

hi dear
iam happy to join this site and than u every u done.
after that iam interesting to help me creating searching botton in vb.net 2008 and sql 2000 by searching id if exists.

this is problem code

Dim sqlconection As New SqlConnection("Data Source=123-pc;Initial Catalog=glorious;User ID=sa")
Dim sqlcommand As New SqlCommand
Dim objDataAdapter As New SqlDataAdapter( _
"SELECT * From store where store_id=txt1.text", sqlconection)

try the hasrows function..

Dim cn as new sqlconnection("connectionstring")
dim cmd as sqlcommand
dim dr as sqldatareader

cmd = new sqlcommand("select * from store where store_id = txt1.text ", cn)
dr = cmd.executereader

if dr.hasrows then
'if the id is existing
msgbox "ID already Exist!"
'go insert here
end if

Cedrick R. Blas

[email protected]

I have a doubt . How to attach the database name ?
u mean to create database name?

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.