Unhandled Exception in System.data


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Unhandled Exception in System.data

  1. #1
    CJ Guest

    Unhandled Exception in System.data


    Hello,
    I am attempting to connect to a Access database using VB.NET. I receive this
    message "Unhandled Exception in System.data.

    I even attempting to run code from a book Dietel & Dietel that shows how
    to connect to an access database but I still receive the error.

    Did I not configure something properly? Any help would be appreciated.

    Thanks.

  2. #2
    CJ Guest

    Re: Unhandled Exception in System.data


    "Phil Weber" <pweber@nospam.fawcette.com> wrote:
    > > Did I not configure something properly?

    >
    >CJ: Impossible to say without seeing your code. Can you post a small sample

    that
    >reproduces the error?
    >--
    >Phil Weber
    >
    >


    Sure, Thanks for helping.

    I basically copied and pasted the code that the books provides. Becasue that
    doesn't work either. (And I screwed up and removed the connection to my own
    project). But, I receive the error where the Fill method of the OLEdataadapter
    is right underneath the InitializeComponent() mehtod.

    thanks again.



    ' Fig. 19.27: DisplayTable.vb
    ' Displaying data from a database table.

    Public Class FrmTableDisplay
    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

    ' fill dataSet11 with data
    OleDbDataAdapter1.Fill(DataSet1, "Authors")

    ' bind data in Users table in dataSet11 to dataGrid1
    dgdAuthors.SetDataBinding(DataSet1, "Authors")
    End Sub ' New

    ' 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 ' Dispose

    Friend WithEvents dgdAuthors As System.Windows.Forms.DataGrid
    Friend WithEvents OleDbSelectCommand1 As _
    System.Data.OleDb.OleDbCommand

    Friend WithEvents OleDbInsertCommand1 As _
    System.Data.OleDb.OleDbCommand

    Friend WithEvents OleDbUpdateCommand1 As _
    System.Data.OleDb.OleDbCommand

    Friend WithEvents OleDbDeleteCommand1 As _
    System.Data.OleDb.OleDbCommand

    Friend WithEvents OleDbConnection1 As _
    System.Data.OleDb.OleDbConnection

    Friend WithEvents OleDbDataAdapter1 As _
    System.Data.OleDb.OleDbDataAdapter

    Friend WithEvents DataSet1 As System.Data.DataSet

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

    ' 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.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()

    Me.dgdAuthors = New System.Windows.Forms.DataGrid()
    Me.OleDbSelectCommand1 = _
    New System.Data.OleDb.OleDbCommand()

    Me.OleDbInsertCommand1 = _
    New System.Data.OleDb.OleDbCommand()

    Me.OleDbUpdateCommand1 = _
    New System.Data.OleDb.OleDbCommand()

    Me.OleDbDeleteCommand1 = _
    New System.Data.OleDb.OleDbCommand()

    Me.OleDbConnection1 = _
    New System.Data.OleDb.OleDbConnection()

    Me.OleDbDataAdapter1 = _
    New System.Data.OleDb.OleDbDataAdapter()

    Me.DataSet1 = New System.Data.DataSet()
    CType(Me.dgdAuthors, _
    System.ComponentModel.ISupportInitialize).BeginInit()

    CType(Me.DataSet1, _
    System.ComponentModel.ISupportInitialize).BeginInit()

    Me.SuspendLayout()

    '
    ' dgdAuthors
    '
    Me.dgdAuthors.DataMember = ""
    Me.dgdAuthors.Location = New System.Drawing.Point(8, 8)
    Me.dgdAuthors.Name = "dgdAuthors"
    Me.dgdAuthors.Size = New System.Drawing.Size(304, 256)
    Me.dgdAuthors.TabIndex = 0

    '
    ' OleDbSelectCommand1
    '
    Me.OleDbSelectCommand1.CommandText = _
    "SELECT authorID, firstName, lastName FROM Authors"

    Me.OleDbSelectCommand1.Connection = Me.OleDbConnection1

    '
    ' OleDbInsertCommand1
    '
    Me.OleDbInsertCommand1.CommandText = _
    "INSERT INTO Authors(authorID, firstName, lastName)" & _
    "VALUES (?, ?, ?)"

    Me.OleDbInsertCommand1.Connection = _
    Me.OleDbConnection1

    Me.OleDbInsertCommand1.Parameters.Add _
    (New System.Data.OleDb.OleDbParameter("authorID", _
    System.Data.OleDb.OleDbType.Numeric, 0, _
    System.Data.ParameterDirection.Input, False, _
    CType(10, Byte), CType(0, Byte), "authorID", _
    System.Data.DataRowVersion.Current, Nothing))

    Me.OleDbInsertCommand1.Parameters.Add _
    (New System.Data.OleDb.OleDbParameter("firstName", _
    System.Data.OleDb.OleDbType.Char, 50, _
    System.Data.ParameterDirection.Input, False, _
    CType(0, Byte), CType(0, Byte), "firstName", _
    System.Data.DataRowVersion.Current, Nothing))

    Me.OleDbInsertCommand1.Parameters.Add _
    (New System.Data.OleDb.OleDbParameter("lastName", _
    System.Data.OleDb.OleDbType.Char, 50, _
    System.Data.ParameterDirection.Input, False, _
    CType(0, Byte), CType(0, Byte), "lastName", _
    System.Data.DataRowVersion.Current, Nothing))

    '
    ' OleDbUpdateCommand1
    '
    Me.OleDbUpdateCommand1.CommandText = _
    "UPDATE Authors SET authorID = ?, firstName = ?, " & _
    "lastName = ? WHERE (authorID = ?)" & _
    " AND (firstName = ?) AND (lastName = ?)"

    Me.OleDbUpdateCommand1.Connection = Me.OleDbConnection1
    Me.OleDbUpdateCommand1.Parameters.Add _
    (New System.Data.OleDb.OleDbParameter("authorID", _
    System.Data.OleDb.OleDbType.Numeric, 0, _
    System.Data.ParameterDirection.Input, False, _
    CType(10, Byte), CType(0, Byte), "authorID", _
    System.Data.DataRowVersion.Current, Nothing))

    Me.OleDbUpdateCommand1.Parameters.Add _
    (New System.Data.OleDb.OleDbParameter("firstName", _
    System.Data.OleDb.OleDbType.Char, 50, _
    System.Data.ParameterDirection.Input, False, _
    CType(0, Byte), CType(0, Byte), "firstName", _
    System.Data.DataRowVersion.Current, Nothing))

    Me.OleDbUpdateCommand1.Parameters.Add _
    (New System.Data.OleDb.OleDbParameter("lastName", _
    System.Data.OleDb.OleDbType.Char, 50, _
    System.Data.ParameterDirection.Input, False, _
    CType(0, Byte), CType(0, Byte), "lastName", _
    System.Data.DataRowVersion.Current, Nothing))

    Me.OleDbUpdateCommand1.Parameters.Add _
    (New System.Data.OleDb.OleDbParameter _
    ("Original_authorID", _
    System.Data.OleDb.OleDbType.Numeric, 0, _
    System.Data.ParameterDirection.Input, False, _
    CType(10, Byte), CType(0, Byte), "authorID", _
    System.Data.DataRowVersion.Original, Nothing))

    Me.OleDbUpdateCommand1.Parameters.Add _
    (New System.Data.OleDb.OleDbParameter _
    ("Original_firstName", _
    System.Data.OleDb.OleDbType.Char, 50, _
    System.Data.ParameterDirection.Input, False, _
    CType(0, Byte), CType(0, Byte), "firstName", _
    System.Data.DataRowVersion.Original, Nothing))

    Me.OleDbUpdateCommand1.Parameters.Add _
    (New System.Data.OleDb.OleDbParameter _
    ("Original_lastName", _
    System.Data.OleDb.OleDbType.Char, 50, _
    System.Data.ParameterDirection.Input, False, _
    CType(0, Byte), CType(0, Byte), "lastName", _
    System.Data.DataRowVersion.Original, Nothing))

    '
    ' OleDbDeleteCommand1
    '
    Me.OleDbDeleteCommand1.CommandText = _
    "DELETE FROM Authors WHERE (authorID = ?) AND " & _
    "(firstName = ?) AND (lastName = ?)"

    Me.OleDbDeleteCommand1.Connection = Me.OleDbConnection1
    Me.OleDbDeleteCommand1.Parameters.Add _
    (New System.Data.OleDb.OleDbParameter("authorID", _
    System.Data.OleDb.OleDbType.Numeric, 0, _
    System.Data.ParameterDirection.Input, False, _
    CType(10, Byte), CType(0, Byte), "authorID", _
    System.Data.DataRowVersion.Original, Nothing))

    Me.OleDbDeleteCommand1.Parameters.Add _
    (New System.Data.OleDb.OleDbParameter("firstName", _
    System.Data.OleDb.OleDbType.Char, 50, _
    System.Data.ParameterDirection.Input, False, _
    CType(0, Byte), CType(0, Byte), "firstName", _
    System.Data.DataRowVersion.Original, Nothing))

    Me.OleDbDeleteCommand1.Parameters.Add _
    (New System.Data.OleDb.OleDbParameter("lastName", _
    System.Data.OleDb.OleDbType.Char, 50, _
    System.Data.ParameterDirection.Input, False, _
    CType(0, Byte), CType(0, Byte), "lastName", _
    System.Data.DataRowVersion.Original, Nothing))

    '
    'OleDbConnection1
    '
    Me.OleDbConnection1.ConnectionString = _
    "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";" & _
    "User ID=Admin;Data Source=C:\Documen" & _
    "ts and Settings\thiago\Desktop\vbhtp2e\examples\" & _
    "Ch19\Fig19_27\Books.mdb;Mode=Sha" & _
    "re Deny None;Extended Properties="""";" & _
    "Jet OLEDB:System database="""";Jet OLEDB:Regis" & _
    "try Path="""";Jet OLEDBatabase Password="""";" & _
    "Jet OLEDB:Engine Type=5;Jet OLEDBat" & _
    "abase Locking Mode=1;Jet OLEDB:Global Partial " & _
    "Bulk Ops=2;Jet OLEDB:Global Bulk T" & _
    "ransactions=1;Jet OLEDB:New Database " & _
    "Password="""";Jet OLEDB:Create System Databas" & _
    "e=False;Jet OLEDB:Encrypt Database=False;" & _
    "Jet OLEDBon't Copy Locale on Compact=" & _
    "False;Jet OLEDB:Compact Without Replica " & _
    "Repair=False;Jet OLEDB:SFP=False"

    '
    ' OleDbDataAdapter1
    '
    Me.OleDbDataAdapter1.DeleteCommand = _
    Me.OleDbDeleteCommand1

    Me.OleDbDataAdapter1.InsertCommand = _
    Me.OleDbInsertCommand1

    Me.OleDbDataAdapter1.SelectCommand = _
    Me.OleDbSelectCommand1

    Me.OleDbDataAdapter1.TableMappings.AddRange _
    (New System.Data.Common.DataTableMapping() _
    {New System.Data.Common.DataTableMapping("Table", _
    "Authors", New System.Data.Common.DataColumnMapping() _
    {New System.Data.Common.DataColumnMapping("authorID", _
    "authorID"), New System.Data.Common.DataColumnMapping _
    ("firstName", "firstName"), _
    New System.Data.Common.DataColumnMapping("lastName", _
    "lastName")})})

    Me.OleDbDataAdapter1.UpdateCommand = _
    Me.OleDbUpdateCommand1

    '
    ' DataSet1
    '
    Me.DataSet1.DataSetName = "NewDataSet"
    Me.DataSet1.Locale = _
    New System.Globalization.CultureInfo("en-US")

    '
    ' FrmTableDisplay
    '
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    Me.ClientSize = New System.Drawing.Size(320, 273)
    Me.Controls.AddRange(New System.Windows.Forms.Control() _
    {Me.dgdAuthors})

    Me.Name = "FrmTableDisplay"
    Me.Text = "Table Display"
    CType(Me.dgdAuthors, System.ComponentModel. _
    ISupportInitialize).EndInit()

    CType(Me.DataSet1, System.ComponentModel. _
    ISupportInitialize).EndInit()

    Me.ResumeLayout(False)

    End Sub ' InitializeComponent

    #End Region

    End Class ' FrmTableDisplay


  3. #3
    Phil Weber Guest

    Re: Unhandled Exception in System.data

    > Did I not configure something properly?

    CJ: Impossible to say without seeing your code. Can you post a small sample that
    reproduces the error?
    --
    Phil Weber



  4. #4
    David Williams Guest

    Re: Unhandled Exception in System.data

    Did you remember to download the Jet provider? It does not come with
    MDAC2.6+, so is not installed by default.

    HTH

    David
    "CJ" <cjnkns@hotmail.com> wrote in message news:3d7f897c$1@10.1.10.29...
    >
    > "Phil Weber" <pweber@nospam.fawcette.com> wrote:
    > > > Did I not configure something properly?

    > >
    > >CJ: Impossible to say without seeing your code. Can you post a small

    sample
    > that
    > >reproduces the error?
    > >--
    > >Phil Weber
    > >
    > >

    >
    > Sure, Thanks for helping.
    >
    > I basically copied and pasted the code that the books provides. Becasue

    that
    > doesn't work either. (And I screwed up and removed the connection to my

    own
    > project). But, I receive the error where the Fill method of the

    OLEdataadapter
    > is right underneath the InitializeComponent() mehtod.
    >
    > thanks again.
    >
    >
    >
    > ' Fig. 19.27: DisplayTable.vb
    > ' Displaying data from a database table.
    >
    > Public Class FrmTableDisplay
    > 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
    >
    > ' fill dataSet11 with data
    > OleDbDataAdapter1.Fill(DataSet1, "Authors")
    >
    > ' bind data in Users table in dataSet11 to dataGrid1
    > dgdAuthors.SetDataBinding(DataSet1, "Authors")
    > End Sub ' New
    >
    > ' 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 ' Dispose
    >
    > Friend WithEvents dgdAuthors As System.Windows.Forms.DataGrid
    > Friend WithEvents OleDbSelectCommand1 As _
    > System.Data.OleDb.OleDbCommand
    >
    > Friend WithEvents OleDbInsertCommand1 As _
    > System.Data.OleDb.OleDbCommand
    >
    > Friend WithEvents OleDbUpdateCommand1 As _
    > System.Data.OleDb.OleDbCommand
    >
    > Friend WithEvents OleDbDeleteCommand1 As _
    > System.Data.OleDb.OleDbCommand
    >
    > Friend WithEvents OleDbConnection1 As _
    > System.Data.OleDb.OleDbConnection
    >
    > Friend WithEvents OleDbDataAdapter1 As _
    > System.Data.OleDb.OleDbDataAdapter
    >
    > Friend WithEvents DataSet1 As System.Data.DataSet
    >
    > ' Required by the Windows Form Designer
    > Private components As System.ComponentModel.Container
    >
    > ' 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.
    > <System.Diagnostics.DebuggerStepThrough()> _
    > Private Sub InitializeComponent()
    >
    > Me.dgdAuthors = New System.Windows.Forms.DataGrid()
    > Me.OleDbSelectCommand1 = _
    > New System.Data.OleDb.OleDbCommand()
    >
    > Me.OleDbInsertCommand1 = _
    > New System.Data.OleDb.OleDbCommand()
    >
    > Me.OleDbUpdateCommand1 = _
    > New System.Data.OleDb.OleDbCommand()
    >
    > Me.OleDbDeleteCommand1 = _
    > New System.Data.OleDb.OleDbCommand()
    >
    > Me.OleDbConnection1 = _
    > New System.Data.OleDb.OleDbConnection()
    >
    > Me.OleDbDataAdapter1 = _
    > New System.Data.OleDb.OleDbDataAdapter()
    >
    > Me.DataSet1 = New System.Data.DataSet()
    > CType(Me.dgdAuthors, _
    > System.ComponentModel.ISupportInitialize).BeginInit()
    >
    > CType(Me.DataSet1, _
    > System.ComponentModel.ISupportInitialize).BeginInit()
    >
    > Me.SuspendLayout()
    >
    > '
    > ' dgdAuthors
    > '
    > Me.dgdAuthors.DataMember = ""
    > Me.dgdAuthors.Location = New System.Drawing.Point(8, 8)
    > Me.dgdAuthors.Name = "dgdAuthors"
    > Me.dgdAuthors.Size = New System.Drawing.Size(304, 256)
    > Me.dgdAuthors.TabIndex = 0
    >
    > '
    > ' OleDbSelectCommand1
    > '
    > Me.OleDbSelectCommand1.CommandText = _
    > "SELECT authorID, firstName, lastName FROM Authors"
    >
    > Me.OleDbSelectCommand1.Connection = Me.OleDbConnection1
    >
    > '
    > ' OleDbInsertCommand1
    > '
    > Me.OleDbInsertCommand1.CommandText = _
    > "INSERT INTO Authors(authorID, firstName, lastName)" & _
    > "VALUES (?, ?, ?)"
    >
    > Me.OleDbInsertCommand1.Connection = _
    > Me.OleDbConnection1
    >
    > Me.OleDbInsertCommand1.Parameters.Add _
    > (New System.Data.OleDb.OleDbParameter("authorID", _
    > System.Data.OleDb.OleDbType.Numeric, 0, _
    > System.Data.ParameterDirection.Input, False, _
    > CType(10, Byte), CType(0, Byte), "authorID", _
    > System.Data.DataRowVersion.Current, Nothing))
    >
    > Me.OleDbInsertCommand1.Parameters.Add _
    > (New System.Data.OleDb.OleDbParameter("firstName", _
    > System.Data.OleDb.OleDbType.Char, 50, _
    > System.Data.ParameterDirection.Input, False, _
    > CType(0, Byte), CType(0, Byte), "firstName", _
    > System.Data.DataRowVersion.Current, Nothing))
    >
    > Me.OleDbInsertCommand1.Parameters.Add _
    > (New System.Data.OleDb.OleDbParameter("lastName", _
    > System.Data.OleDb.OleDbType.Char, 50, _
    > System.Data.ParameterDirection.Input, False, _
    > CType(0, Byte), CType(0, Byte), "lastName", _
    > System.Data.DataRowVersion.Current, Nothing))
    >
    > '
    > ' OleDbUpdateCommand1
    > '
    > Me.OleDbUpdateCommand1.CommandText = _
    > "UPDATE Authors SET authorID = ?, firstName = ?, " & _
    > "lastName = ? WHERE (authorID = ?)" & _
    > " AND (firstName = ?) AND (lastName = ?)"
    >
    > Me.OleDbUpdateCommand1.Connection = Me.OleDbConnection1
    > Me.OleDbUpdateCommand1.Parameters.Add _
    > (New System.Data.OleDb.OleDbParameter("authorID", _
    > System.Data.OleDb.OleDbType.Numeric, 0, _
    > System.Data.ParameterDirection.Input, False, _
    > CType(10, Byte), CType(0, Byte), "authorID", _
    > System.Data.DataRowVersion.Current, Nothing))
    >
    > Me.OleDbUpdateCommand1.Parameters.Add _
    > (New System.Data.OleDb.OleDbParameter("firstName", _
    > System.Data.OleDb.OleDbType.Char, 50, _
    > System.Data.ParameterDirection.Input, False, _
    > CType(0, Byte), CType(0, Byte), "firstName", _
    > System.Data.DataRowVersion.Current, Nothing))
    >
    > Me.OleDbUpdateCommand1.Parameters.Add _
    > (New System.Data.OleDb.OleDbParameter("lastName", _
    > System.Data.OleDb.OleDbType.Char, 50, _
    > System.Data.ParameterDirection.Input, False, _
    > CType(0, Byte), CType(0, Byte), "lastName", _
    > System.Data.DataRowVersion.Current, Nothing))
    >
    > Me.OleDbUpdateCommand1.Parameters.Add _
    > (New System.Data.OleDb.OleDbParameter _
    > ("Original_authorID", _
    > System.Data.OleDb.OleDbType.Numeric, 0, _
    > System.Data.ParameterDirection.Input, False, _
    > CType(10, Byte), CType(0, Byte), "authorID", _
    > System.Data.DataRowVersion.Original, Nothing))
    >
    > Me.OleDbUpdateCommand1.Parameters.Add _
    > (New System.Data.OleDb.OleDbParameter _
    > ("Original_firstName", _
    > System.Data.OleDb.OleDbType.Char, 50, _
    > System.Data.ParameterDirection.Input, False, _
    > CType(0, Byte), CType(0, Byte), "firstName", _
    > System.Data.DataRowVersion.Original, Nothing))
    >
    > Me.OleDbUpdateCommand1.Parameters.Add _
    > (New System.Data.OleDb.OleDbParameter _
    > ("Original_lastName", _
    > System.Data.OleDb.OleDbType.Char, 50, _
    > System.Data.ParameterDirection.Input, False, _
    > CType(0, Byte), CType(0, Byte), "lastName", _
    > System.Data.DataRowVersion.Original, Nothing))
    >
    > '
    > ' OleDbDeleteCommand1
    > '
    > Me.OleDbDeleteCommand1.CommandText = _
    > "DELETE FROM Authors WHERE (authorID = ?) AND " & _
    > "(firstName = ?) AND (lastName = ?)"
    >
    > Me.OleDbDeleteCommand1.Connection = Me.OleDbConnection1
    > Me.OleDbDeleteCommand1.Parameters.Add _
    > (New System.Data.OleDb.OleDbParameter("authorID", _
    > System.Data.OleDb.OleDbType.Numeric, 0, _
    > System.Data.ParameterDirection.Input, False, _
    > CType(10, Byte), CType(0, Byte), "authorID", _
    > System.Data.DataRowVersion.Original, Nothing))
    >
    > Me.OleDbDeleteCommand1.Parameters.Add _
    > (New System.Data.OleDb.OleDbParameter("firstName", _
    > System.Data.OleDb.OleDbType.Char, 50, _
    > System.Data.ParameterDirection.Input, False, _
    > CType(0, Byte), CType(0, Byte), "firstName", _
    > System.Data.DataRowVersion.Original, Nothing))
    >
    > Me.OleDbDeleteCommand1.Parameters.Add _
    > (New System.Data.OleDb.OleDbParameter("lastName", _
    > System.Data.OleDb.OleDbType.Char, 50, _
    > System.Data.ParameterDirection.Input, False, _
    > CType(0, Byte), CType(0, Byte), "lastName", _
    > System.Data.DataRowVersion.Original, Nothing))
    >
    > '
    > 'OleDbConnection1
    > '
    > Me.OleDbConnection1.ConnectionString = _
    > "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";" & _
    > "User ID=Admin;Data Source=C:\Documen" & _
    > "ts and Settings\thiago\Desktop\vbhtp2e\examples\" & _
    > "Ch19\Fig19_27\Books.mdb;Mode=Sha" & _
    > "re Deny None;Extended Properties="""";" & _
    > "Jet OLEDB:System database="""";Jet OLEDB:Regis" & _
    > "try Path="""";Jet OLEDBatabase Password="""";" & _
    > "Jet OLEDB:Engine Type=5;Jet OLEDBat" & _
    > "abase Locking Mode=1;Jet OLEDB:Global Partial " & _
    > "Bulk Ops=2;Jet OLEDB:Global Bulk T" & _
    > "ransactions=1;Jet OLEDB:New Database " & _
    > "Password="""";Jet OLEDB:Create System Databas" & _
    > "e=False;Jet OLEDB:Encrypt Database=False;" & _
    > "Jet OLEDBon't Copy Locale on Compact=" & _
    > "False;Jet OLEDB:Compact Without Replica " & _
    > "Repair=False;Jet OLEDB:SFP=False"
    >
    > '
    > ' OleDbDataAdapter1
    > '
    > Me.OleDbDataAdapter1.DeleteCommand = _
    > Me.OleDbDeleteCommand1
    >
    > Me.OleDbDataAdapter1.InsertCommand = _
    > Me.OleDbInsertCommand1
    >
    > Me.OleDbDataAdapter1.SelectCommand = _
    > Me.OleDbSelectCommand1
    >
    > Me.OleDbDataAdapter1.TableMappings.AddRange _
    > (New System.Data.Common.DataTableMapping() _
    > {New System.Data.Common.DataTableMapping("Table", _
    > "Authors", New System.Data.Common.DataColumnMapping() _
    > {New System.Data.Common.DataColumnMapping("authorID", _
    > "authorID"), New System.Data.Common.DataColumnMapping _
    > ("firstName", "firstName"), _
    > New System.Data.Common.DataColumnMapping("lastName", _
    > "lastName")})})
    >
    > Me.OleDbDataAdapter1.UpdateCommand = _
    > Me.OleDbUpdateCommand1
    >
    > '
    > ' DataSet1
    > '
    > Me.DataSet1.DataSetName = "NewDataSet"
    > Me.DataSet1.Locale = _
    > New System.Globalization.CultureInfo("en-US")
    >
    > '
    > ' FrmTableDisplay
    > '
    > Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    > Me.ClientSize = New System.Drawing.Size(320, 273)
    > Me.Controls.AddRange(New System.Windows.Forms.Control() _
    > {Me.dgdAuthors})
    >
    > Me.Name = "FrmTableDisplay"
    > Me.Text = "Table Display"
    > CType(Me.dgdAuthors, System.ComponentModel. _
    > ISupportInitialize).EndInit()
    >
    > CType(Me.DataSet1, System.ComponentModel. _
    > ISupportInitialize).EndInit()
    >
    > Me.ResumeLayout(False)
    >
    > End Sub ' InitializeComponent
    >
    > #End Region
    >
    > End Class ' FrmTableDisplay
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center