Results 1 to 8 of 8

Thread: complex databind question

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Posts
    7

    complex databind question

    I am getting this error and I dont know why.
    An unhandled exception of type 'System.InvalidOperationException' occurred in system.windows.forms.dll
    Additional information: Cannot create a child list for field ?????.
    --------------------------------------------------------------------------------

    Thanks in advance for any help.
    this is my code:


    Code:
    varAccountID = lblAccountID.Text
            'fills demos dataset        
            Dim selectCMD As SqlCommand = New SqlCommand("SELECT q.question_id, q.short_form, '' FROM question AS q INNER JOIN question_set AS qs ON q.question_id=qs.question_id WHERE qs.affinity_id=1 AND q.question_id NOT IN (SELECT v.question_id FROM answer_heading AS h INNER JOIN answer_value AS v ON h.answer_id=v.answer_id WHERE h.account_id = '" & varAccountID & "')UNION SELECT q.question_id, q.short_form, v.response FROM answer_heading AS h INNER JOIN answer_value AS v ON h.answer_id=v.answer_id INNER JOIN question AS q ON v.question_id=q.question_id WHERE(h.account_id = '" & varAccountID & "')ORDER BY q.question_id", SqlConnection1)
    
            Dim daAnswers As SqlDataAdapter = New SqlDataAdapter
            daAnswers.SelectCommand = selectCMD
    
            SqlConnection1.Open()
    
            Dim DsAnswers1 As DataSet = New DataSet
            DataGrid1.DataSource = DsAnswers1
    
            DsAnswers1.Clear()
            daAnswers.Fill(DsAnswers1)
    
            SqlConnection1.Close()
    Last edited by bprego; Feb 11th, 2004 at 03:01 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width