Click here to Skip to main content
15,904,822 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Encryption & Decryption Pin
SNarayanan30-Jul-08 22:28
SNarayanan30-Jul-08 22:28 
GeneralRe: Encryption & Decryption Pin
Ravi Kumar Tyagi4-Aug-08 1:20
Ravi Kumar Tyagi4-Aug-08 1:20 
QuestionConnecting Access with VB.Net in Visual Studio 2005 or 2008 Pin
Zaid Pirwani29-Jul-08 18:57
Zaid Pirwani29-Jul-08 18:57 
AnswerRe: Connecting Access with VB.Net in Visual Studio 2005 or 2008 Pin
Christian Graus29-Jul-08 20:10
protectorChristian Graus29-Jul-08 20:10 
QuestionRe: Connecting Access with VB.Net in Visual Studio 2005 or 2008 Pin
Zaid Pirwani30-Jul-08 5:28
Zaid Pirwani30-Jul-08 5:28 
AnswerRe: Connecting Access with VB.Net in Visual Studio 2005 or 2008 Pin
Ravi Kumar Tyagi29-Jul-08 21:38
Ravi Kumar Tyagi29-Jul-08 21:38 
QuestionRe: Connecting Access with VB.Net in Visual Studio 2005 or 2008 [modified] Pin
Zaid Pirwani29-Jul-08 22:36
Zaid Pirwani29-Jul-08 22:36 
AnswerRe: Connecting Access with VB.Net in Visual Studio 2005 or 2008 Pin
Vimalsoft(Pty) Ltd29-Jul-08 22:44
professionalVimalsoft(Pty) Ltd29-Jul-08 22:44 
Good Morning Muhammad Zaid Pirwani

The Problem when using the Wizard is that you will never understand what is wrong when something is wrong. i suggest you start writting code and connect to your Database your self. its simple. You are going to do the Following

In your Project as you know you have to import the Following

Imports System.Data
Imports System.Data.OleDb


And your code for Database Access , should be Something like this

'Connection String for the Access Database
   Dim strCon As String = "Data Source=C:\Valuation Roll\ValuationRoll_CD.mdb; Provider=Microsoft.Jet.OLEDB.4.0;persist security info=False;User ID=Admin"

   Dim con As  new OleDbConnection(strCon) 'Declaring a Connection Object

   Dim cmdselect As new OleDbCommand 'Declaring a Command object

   Dim da As new OleDbDataAdapter 'Declaring an Adapter

       Dim dsdata As New DataSet

       cmdselect.CommandText = "SELECT * FROM mytable"

       cmdselect.CommandTimeout = 0

       cmdselect.CommandType = CommandType.Text

       cmdselect.Connection = con

       da.SelectCommand = cmdselect

       Try

           con.Open()

           dsdata.Clear()

           da.Fill(dsdata, "mytable")

           con.Close()

       Catch

           Throw

       End Try


And you can Bind your Control , mybe a Datagrid

like this

Try


           datagrid1.DataSource = ds

           datagrid1.DataMember = "mytable"


       Catch ex As Exception
           MessageBox.Show(ex.Message)


       End Try


and Walla its Simple , Check my Articles about doing Database work without relying on Wizards. Wizards dont give you the Flexebility and they will never allow you to learn, as you say you are new to coding , you have to start coding and stop using Wizards

Hope this Helps

Vuyiswa Maseko,

Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding

VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za


QuestionRe: Connecting Access with VB.Net in Visual Studio 2005 or 2008 Pin
Zaid Pirwani30-Jul-08 5:26
Zaid Pirwani30-Jul-08 5:26 
AnswerRe: Connecting Access with VB.Net in Visual Studio 2005 or 2008 Pin
Vimalsoft(Pty) Ltd30-Jul-08 19:40
professionalVimalsoft(Pty) Ltd30-Jul-08 19:40 
QuestionProblem in accessing CD Drive in VB/VB.Net 2.0! Pin
priyamtheone29-Jul-08 6:06
priyamtheone29-Jul-08 6:06 
AnswerRe: Problem in accessing CD Drive in VB/VB.Net 2.0! Pin
Christian Graus29-Jul-08 20:11
protectorChristian Graus29-Jul-08 20:11 
GeneralRe: Problem in accessing CD Drive in VB/VB.Net 2.0! Pin
priyamtheone1-Aug-08 6:49
priyamtheone1-Aug-08 6:49 
QuestionWinsock array Pin
lorenzoo29-Jul-08 5:37
lorenzoo29-Jul-08 5:37 
AnswerRe: Winsock array Pin
jzonthemtn29-Jul-08 6:32
jzonthemtn29-Jul-08 6:32 
AnswerRe: Winsock array Pin
Ravi Kumar Tyagi29-Jul-08 21:30
Ravi Kumar Tyagi29-Jul-08 21:30 
Questionpassing data between procedures Pin
Matthew Leggett29-Jul-08 4:07
Matthew Leggett29-Jul-08 4:07 
AnswerRe: passing data between procedures Pin
ChandraRam30-Jul-08 23:19
ChandraRam30-Jul-08 23:19 
QuestionDatagrid Pin
g.hanuman29-Jul-08 3:29
g.hanuman29-Jul-08 3:29 
AnswerRe: Datagrid Pin
John_Adams29-Jul-08 4:21
John_Adams29-Jul-08 4:21 
QuestionPlease Clear my Confusion.. Pin
guriqbal8729-Jul-08 3:09
guriqbal8729-Jul-08 3:09 
AnswerRe: Please Clear my Confusion.. Pin
jzonthemtn29-Jul-08 3:36
jzonthemtn29-Jul-08 3:36 
AnswerRe: Please Clear my Confusion.. Pin
Mycroft Holmes29-Jul-08 19:11
professionalMycroft Holmes29-Jul-08 19:11 
GeneralRe: Please Clear my Confusion.. Pin
jzonthemtn30-Jul-08 4:29
jzonthemtn30-Jul-08 4:29 
AnswerRe: Please Clear my Confusion.. Pin
Vimalsoft(Pty) Ltd29-Jul-08 23:07
professionalVimalsoft(Pty) Ltd29-Jul-08 23:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.