Click here to Skip to main content
15,922,574 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralHelp me ASAP. Pin
abeyphier4-Apr-05 4:05
abeyphier4-Apr-05 4:05 
GeneralRe: Help me ASAP. Pin
Christian Graus4-Apr-05 10:34
protectorChristian Graus4-Apr-05 10:34 
GeneralRe: Help me ASAP. Pin
Dave Kreskowiak4-Apr-05 14:13
mveDave Kreskowiak4-Apr-05 14:13 
GeneralRe: Help me ASAP. Pin
Christian Graus4-Apr-05 14:23
protectorChristian Graus4-Apr-05 14:23 
GeneralRe: Help me ASAP. Pin
Dave Kreskowiak4-Apr-05 16:00
mveDave Kreskowiak4-Apr-05 16:00 
GeneralAccess-- Connection String Pin
Anonymous4-Apr-05 3:30
Anonymous4-Apr-05 3:30 
GeneralRe: Access-- Connection String Pin
Jim Matthews4-Apr-05 4:47
Jim Matthews4-Apr-05 4:47 
GeneralRe: Access-- Connection String Pin
Anonymous4-Apr-05 5:10
Anonymous4-Apr-05 5:10 
Hi Jim,
Thank You for your response.Here is my code.Am not knowing where's the change needed.

Once again, Thanks in advance.



Code:

Imports System.Data.OleDb
Public Class Form2
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
Friend WithEvents Button1 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.DataGrid1 = New System.Windows.Forms.DataGrid
Me.Button1 = New System.Windows.Forms.Button
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'DataGrid1
'
Me.DataGrid1.DataMember = ""
Me.DataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.DataGrid1.Location = New System.Drawing.Point(56, 24)
Me.DataGrid1.Name = "DataGrid1"
Me.DataGrid1.TabIndex = 0
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(88, 144)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 1
Me.Button1.Text = "Button1"
'
'Form2
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 266)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.DataGrid1)
Me.Name = "Form2"
Me.Text = "Form2"
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)

End Sub

#End Region
Dim con As OleDbConnection
Dim da As OleDbDataAdapter

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\work\Student.mdb;User Id=Admin;Password=;"
con.Open()
da.SelectCommand = New OleDbCommand("Select * from Users", con)
Dim ds As DataSet
ds = New DataSet("Users")
da.Fill(ds)
DataGrid1.DataMember = "Users"
DataGrid1.DataSource = ds
End Sub
End Class


GeneralRe: Access-- Connection String Pin
Jim Matthews4-Apr-05 5:30
Jim Matthews4-Apr-05 5:30 
GeneralRe: Access-- Connection String Pin
Anonymous4-Apr-05 6:16
Anonymous4-Apr-05 6:16 
GeneralRe: Access-- Connection String Pin
Jim Matthews4-Apr-05 6:50
Jim Matthews4-Apr-05 6:50 
Generalhello anybody can solve it Pin
Anonymous4-Apr-05 3:17
Anonymous4-Apr-05 3:17 
GeneralRe: hello anybody can solve it Pin
Jim Matthews4-Apr-05 4:52
Jim Matthews4-Apr-05 4:52 
GeneralRe: hello anybody can solve it Pin
Anonymous4-Apr-05 19:41
Anonymous4-Apr-05 19:41 
GeneralDataset Help Pin
nitin_ion4-Apr-05 1:56
nitin_ion4-Apr-05 1:56 
GeneralXML Didn't post Pin
Colin Angus Mackay4-Apr-05 2:32
Colin Angus Mackay4-Apr-05 2:32 
GeneralRe: XML Didn't post Pin
nitin_ion4-Apr-05 17:22
nitin_ion4-Apr-05 17:22 
GeneralCPU ID and Mac address Pin
Dile4-Apr-05 1:39
Dile4-Apr-05 1:39 
GeneralRe: CPU ID and Mac address Pin
Anonymous4-Apr-05 15:21
Anonymous4-Apr-05 15:21 
GeneralCustom button Pin
kurtvandoorne4-Apr-05 1:36
kurtvandoorne4-Apr-05 1:36 
GeneralRe: Custom button Pin
Mitch F.4-Apr-05 7:49
Mitch F.4-Apr-05 7:49 
GeneralVB vs C++ for COM Development Pin
Anonymous4-Apr-05 0:02
Anonymous4-Apr-05 0:02 
GeneralSimple VB Code Pin
firestar_3x3-Apr-05 23:41
firestar_3x3-Apr-05 23:41 
GeneralCan U help me on this? Pin
abeyphier4-Apr-05 3:54
abeyphier4-Apr-05 3:54 
GeneralDatagrid Selection by Row Pin
Sniper6663-Apr-05 20:12
Sniper6663-Apr-05 20:12 

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.