VB.Net 2005 And Databinding
-
In vb.net 2005 we can not use oracle database 8.0.5 at desing time.For this we need to use the connection string at run time to execute queries. I have a customers form and using treeview to display the customers and by selecting the customer from the treeview I need to show the detail of the selected customer in the controls like (TextBox,ComboBox).I can get the detail by running the following query but don't know how to bind the controls after getting the result. Using the following query to get the result of the selected customer. "Select * from customers where custcode = '" & mcustcode & "' Any idea or any sample code which can help. Thanks In advance Ejaz
-
In vb.net 2005 we can not use oracle database 8.0.5 at desing time.For this we need to use the connection string at run time to execute queries. I have a customers form and using treeview to display the customers and by selecting the customer from the treeview I need to show the detail of the selected customer in the controls like (TextBox,ComboBox).I can get the detail by running the following query but don't know how to bind the controls after getting the result. Using the following query to get the result of the selected customer. "Select * from customers where custcode = '" & mcustcode & "' Any idea or any sample code which can help. Thanks In advance Ejaz
Explaining the basics of data access in .NET is beyond the scope of a forum post. I suggest you buy a beginner's book on VB.NET and ADO.NET. A quick Google search[^] also threw up some articles you may like to read.
Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
-
In vb.net 2005 we can not use oracle database 8.0.5 at desing time.For this we need to use the connection string at run time to execute queries. I have a customers form and using treeview to display the customers and by selecting the customer from the treeview I need to show the detail of the selected customer in the controls like (TextBox,ComboBox).I can get the detail by running the following query but don't know how to bind the controls after getting the result. Using the following query to get the result of the selected customer. "Select * from customers where custcode = '" & mcustcode & "' Any idea or any sample code which can help. Thanks In advance Ejaz
Try something like this :-
myTextBox.DataBinding.Add("Text", myDataSet.Table(0), "FieldToBind")
Steve Jowett ------------------------- It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)