Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Cannot create a child list for field property

Cannot create a child list for field property

Scheduled Pinned Locked Moved Visual Basic
databasequestionwpfwcfsysadmin
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jaydeanster
    wrote on last edited by
    #1

    Hello all, Two part question: A. What am I doing wrong with the code below to generate the error on the Subject line above? B. Is binding the best option (such as the one I have below) of displaying a specific record on a form? ////////////////////// Private sqlConn As SqlConnection Private SqlDataAdapter1 As SqlDataAdapter Private sqlCmd As SqlCommand Private DataSet11 As DataSet Private Sub frmPropertyDetailTest_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim pintProperty As Short Dim pbndtemp As Binding sqlConn = New SqlConnection("Server=server;Database=db;User ID=us;Password=pw;Trusted_Connection=False") sqlCmd = New SqlCommand sqlCmd.Connection = sqlConn sqlCmd.CommandType = CommandType.Text sqlCmd.CommandText = "SELECT dbo.property.* FROM dbo.property" sqlConn.Open() SqlDataAdapter1 = New SqlDataAdapter SqlDataAdapter1.SelectCommand = sqlCmd DataSet11 = New DataSet pintProperty = Me.SqlDataAdapter1.Fill(DataSet11) pbndtemp = New Binding("Text", DataSet11, "property.PropertyID") Me.txtPropertyID.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.PropertyName") Me.txtPropertyName.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.Address1") Me.txtAddress1.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.Address2") Me.txtAddress2.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.City") Me.txtCity.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.State") Me.txtState.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.Postal") Me.txtZip.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.Country") Me.txtCountry.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.Business") Me.txtBusinessNumber.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.Fax") Me.txtFaxNumber.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.Support") Me.txtSupportNumber.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "proper

    V 1 Reply Last reply
    0
    • J Jaydeanster

      Hello all, Two part question: A. What am I doing wrong with the code below to generate the error on the Subject line above? B. Is binding the best option (such as the one I have below) of displaying a specific record on a form? ////////////////////// Private sqlConn As SqlConnection Private SqlDataAdapter1 As SqlDataAdapter Private sqlCmd As SqlCommand Private DataSet11 As DataSet Private Sub frmPropertyDetailTest_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim pintProperty As Short Dim pbndtemp As Binding sqlConn = New SqlConnection("Server=server;Database=db;User ID=us;Password=pw;Trusted_Connection=False") sqlCmd = New SqlCommand sqlCmd.Connection = sqlConn sqlCmd.CommandType = CommandType.Text sqlCmd.CommandText = "SELECT dbo.property.* FROM dbo.property" sqlConn.Open() SqlDataAdapter1 = New SqlDataAdapter SqlDataAdapter1.SelectCommand = sqlCmd DataSet11 = New DataSet pintProperty = Me.SqlDataAdapter1.Fill(DataSet11) pbndtemp = New Binding("Text", DataSet11, "property.PropertyID") Me.txtPropertyID.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.PropertyName") Me.txtPropertyName.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.Address1") Me.txtAddress1.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.Address2") Me.txtAddress2.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.City") Me.txtCity.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.State") Me.txtState.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.Postal") Me.txtZip.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.Country") Me.txtCountry.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.Business") Me.txtBusinessNumber.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.Fax") Me.txtFaxNumber.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "property.Support") Me.txtSupportNumber.DataBindings.Add(pbndtemp) pbndtemp = New Binding("Text", DataSet11, "proper

      V Offline
      V Offline
      Virus Detecter
      wrote on last edited by
      #2

      Hello Try to use the property in DataMember Property Use with ur Database Name,(i.e) Dbo , In ur Fill statement the table name comes with DB name check the table mappings property Ishak

      A 1 Reply Last reply
      0
      • V Virus Detecter

        Hello Try to use the property in DataMember Property Use with ur Database Name,(i.e) Dbo , In ur Fill statement the table name comes with DB name check the table mappings property Ishak

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        It didn't work. :(

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups