943,096 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 4111
  • VB.NET RSS
Apr 25th, 2008
0

VB.Net 2008 errors with ADO Data control and Data Grid

Expand Post »
I have a form in VB.Net (2008) that includes a Data Grid (DataGrid1) and an ADO Data Control 6.0 (ADODC1), which were inherited from VB6 in a VB6 to VB.Net upgrade. The application in VB6 ran perfectly; and my VB.Net version also runs perfectly, but not without first generating some errors.

When I attempt, at design time, to bind my Data Grid to the Data Control, I get the error: "Command Text was not set for the command Object". I also get the same error when I execute the line of code below, which is found in the file <formname>.designer.vb. I have also been getting the error "Data Source name not found and no default driver specified", although I can't, at the moment, get that error to repeat itself, so I can't tell you, exactly, what conditions precipitate that error message.

Your help in helping me figure this out is greatly appreciated. Thanks, ~Peter Ferber

VB.NET Syntax (Toggle Plain Text)
  1. Public Sub VB6_AddADODataBinding()
  2. On Error GoTo Err
  3. DataGrid1.DataSource = CType(Adodc1, msdatasrc.DataSource)
  4.  
  5. Sub_Exit:
  6. Exit Sub
  7.  
  8. Err:
  9. Select Case Err.Number
  10. Case Else
  11. Call MyUniversalClass.PrintError(Err, "VB6_AddADODataBinding")
  12. Resume Sub_Exit
  13. Resume
  14. End Select
  15. End Sub
Last edited by Peter Ferber; Apr 25th, 2008 at 3:55 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Peter Ferber is offline Offline
1 posts
since Apr 2008
Oct 25th, 2010
0
Re: VB.Net 2008 errors with ADO Data control and Data Grid
Dear Peter,

I have the same Problem.
Did you find a solution.

Horst Brand
Reputation Points: 10
Solved Threads: 0
Newbie Poster
codegans is offline Offline
1 posts
since Oct 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Select * from like [multiple like]
Next Thread in VB.NET Forum Timeline: Access VBA Ques.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC