Click here to Skip to main content
15,892,005 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How do i know my control have Set BringtoFront? Pin
Dave Kreskowiak17-Feb-07 10:26
mveDave Kreskowiak17-Feb-07 10:26 
QuestionControls created on one thread cannot be parented to a control on a different thread. Pin
charchabil0316-Feb-07 20:39
charchabil0316-Feb-07 20:39 
AnswerRe: Controls created on one thread cannot be parented to a control on a different thread. [modified] Pin
TwoFaced16-Feb-07 22:15
TwoFaced16-Feb-07 22:15 
GeneralRe: Controls created on one thread cannot be parented to a control on a different thread. Pin
charchabil0317-Feb-07 6:09
charchabil0317-Feb-07 6:09 
QuestionAdding additional text to Dropdown list Pin
Praveen 12316-Feb-07 17:41
Praveen 12316-Feb-07 17:41 
QuestionCreating a new row. Pin
v45030516-Feb-07 15:09
v45030516-Feb-07 15:09 
AnswerRe: Creating a new row. Pin
_mubashir17-Feb-07 8:37
_mubashir17-Feb-07 8:37 
GeneralRe: Creating a new row. Pin
v45030518-Feb-07 4:45
v45030518-Feb-07 4:45 
hi dear
I tried to find a lot ...as i am new to vb.net therefore suffering to solve my problem.

I used following code to retrive data..
Now i want to insert...but unable to do so...

Imports System.Data.OleDb
Public Class Form1 Inherits System.Windows.Forms.Form
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e as _
System.EventArgs) Handles MyBase.Load
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_
System.EventArgs) Handles Button1.Click
Try
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;_
Data Source=C:\emp.mdb;")
'provider to be used when working with access database
cn.Open()
cmd = New OleDbCommand("select * from table1", cn)
dr = cmd.ExecuteReader
While dr.Read()
TextBox1.Text = dr(0)
TextBox2.Text = dr(1)
TextBox3.Text = dr(2)
' loading data into TextBoxes by column index
End While
Catch
End Try
dr.Close()
cn.Close()
End Sub
End Class


regards
adil

m.adil.farooq
mcs & acca
adil-farooq@maktoob.com

AnswerRe: Creating a new row. Pin
GoodID19-Feb-07 22:49
GoodID19-Feb-07 22:49 
QuestionPopup dialog in a screensaver Pin
jim_taylor16-Feb-07 9:56
jim_taylor16-Feb-07 9:56 
Questionpdf read files Pin
haggenx16-Feb-07 8:11
haggenx16-Feb-07 8:11 
AnswerRe: pdf read files Pin
Dave Kreskowiak16-Feb-07 8:36
mveDave Kreskowiak16-Feb-07 8:36 
GeneralRe: pdf read files Pin
haggenx20-Feb-07 8:25
haggenx20-Feb-07 8:25 
AnswerRe: pdf read files Pin
KreativeKai16-Feb-07 9:17
professionalKreativeKai16-Feb-07 9:17 
AnswerRe: Calculating the number of days Pin
Stefan Troschuetz16-Feb-07 5:09
Stefan Troschuetz16-Feb-07 5:09 
Questionvb-com error 70 Pin
aamn116-Feb-07 2:28
aamn116-Feb-07 2:28 
AnswerRe: vb-com error 70 Pin
Dave Kreskowiak16-Feb-07 4:39
mveDave Kreskowiak16-Feb-07 4:39 
QuestionRe: vb-com error 70 Pin
aamn15-Mar-07 1:43
aamn15-Mar-07 1:43 
AnswerRe: vb-com error 70 Pin
Dave Kreskowiak5-Mar-07 3:09
mveDave Kreskowiak5-Mar-07 3:09 
GeneralRe: vb-com error 70 Pin
aamn15-Mar-07 18:14
aamn15-Mar-07 18:14 
QuestionCopying an image Pin
Zaegra16-Feb-07 2:26
Zaegra16-Feb-07 2:26 
AnswerRe: Copying an image Pin
kubben16-Feb-07 2:50
kubben16-Feb-07 2:50 
AnswerRe: Copying an image Pin
MatrixCoder16-Feb-07 3:38
MatrixCoder16-Feb-07 3:38 
AnswerRe: Copying an image Pin
Dave Kreskowiak16-Feb-07 4:41
mveDave Kreskowiak16-Feb-07 4:41 
GeneralRe: Copying an image Pin
Zaegra18-Feb-07 0:27
Zaegra18-Feb-07 0:27 

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.