Hi there
I am new to VB.Net (formerly a Centura 'Gupta' programmer) and just trying to do a simple excercise out of the help to populate a couple of text fields on a form by using a parameterized query.
ie. Walkthrough 'Displaying Data in a Windows Form Using a Parameterized Query
Sounds simple but for some reason when I get to the step where you are supposed to 'Expand the (DataBindings) node, and for the Text property, expand DsAuthors1, expand authors, and select au_id from the drop-down list.
I don't have a drop down list?! It's empty
Please help me find what I'm missing here
I have the following on my form
OdbcDataAdapter with a simple select command 'SELECT MBR_SAID, MBR_SURNAME, MBR_ADDR1 FROM FHP_MBR WHERE (MBR_SAID = ?)
OdbcConnection (to an Access database
and a DataSet (dsMbr
The following code is for the button click
Private Sub Button1_Click_1 (ByVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Clic
OdbcDataAdapter 1.SelectCommand .Parameters("mb r_said").Value = dfnMbr_said.Tex
dsMbr.Clear(
OdbcDataAdapter 1.Fill(dsMbr
End Su
So what am I missing here please? I know it's probably simple... I just need a jumpstart
How do I bind the results of this query to the appropriate fields
I am using the VB.Net Standard edition and have therefore had to export my Oracle tables into Access for the purpose of this excercise since I believe you need the full blown Enterprise edition of Visual Studio to connect to Oracle
Thanks
Marnie 3 3250
Hi,
To bind a textbox to a datasource. This will bind the CategoryName
field of a dataset ds to textbox2.
TextBox2.DataBi ndings.Add("Tex t", ds.Tables(0), "CategoryNa me")
To use the oracle data provider you need to add a reference to
system.data.ora cleclient.dll. http://msdn.microsoft.com/library/de...sctorTopic.asp
Ken
------------------
"Marnie" <an*******@disc ussions.microso ft.com> wrote in message
news:43******** *************** ***********@mic rosoft.com... Hi there, I am new to VB.Net (formerly a Centura 'Gupta' programmer) and just trying to do a simple excercise out of the help to populate a couple of text fields on a form by using a parameterized query.. ie. Walkthrough 'Displaying Data in a Windows Form Using a Parameterized Query' Sounds simple but for some reason when I get to the step where you are supposed to 'Expand the (DataBindings) node, and for the Text property, expand DsAuthors1, expand authors, and select au_id from the drop-down list.' I don't have a drop down list?! It's empty. Please help me find what I'm missing here!
I have the following on my form: OdbcDataAdapter with a simple select command 'SELECT MBR_SAID, MBR_SURNAME, MBR_ADDR1 FROM FHP_MBR WHERE (MBR_SAID = ?)' OdbcConnection (to an Access database) and a DataSet (dsMbr)
The following code is for the button click: Private Sub Button1_Click_1 (ByVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click OdbcDataAdapter 1.SelectCommand .Parameters("mb r_said").Value = dfnMbr_said.Tex t dsMbr.Clear() OdbcDataAdapter 1.Fill(dsMbr) End Sub
So what am I missing here please? I know it's probably simple... I just need a jumpstart! How do I bind the results of this query to the appropriate fields? I am using the VB.Net Standard edition and have therefore had to export my Oracle tables into Access for the purpose of this excercise since I believe you need the full blown Enterprise edition of Visual Studio to connect to Oracle. Thanks, Marnie.
Hi Ken
Thanks for your response
I did try using something similar to that ie
Protected Sub BindControls(
dfsMbr_Surname. DataBindings.Ad d(New Binding("Text", dsMbr, "mbr.mbr_surnam e")
End Su
Should that work too
Although I wasn't sure then where to call BindControls() from? Where are you suggesting to put the code
TextBox2.DataBi ndings.Add("Tex t", ds.Tables(0), "CategoryNa me"
Does Tables(0) select the first table (being the only one in my case) in the query
I thought that I was going to be able to do this by going through the properties of TextBox2 (in my case dfsMbr_Surname) as per the documentation. I assume the code you gave me is generated for you if you do it through the properties dialog
Still wondering why nothing appeared in the Data Bindings section of the datafield properties
Thanks
Marnie
----- Ken Tucker [MVP] wrote: ----
Hi
To bind a textbox to a datasource. This will bind the CategoryName
field of a dataset ds to textbox2
TextBox2.DataBi ndings.Add("Tex t", ds.Tables(0), "CategoryNa me"
To use the oracle data provider you need to add a reference to
system.data.ora cleclient.dll http://msdn.microsoft.com/library/de...ssctorTopic.as
Ke
-----------------
"Marnie" <an*******@disc ussions.microso ft.com> wrote in message
news:43******** *************** ***********@mic rosoft.com.. Hi there I am new to VB.Net (formerly a Centura 'Gupta' programmer) and just trying to do a simple excercise out of the help to populate a couple of text fields on a form by using a parameterized query. ie. Walkthrough 'Displaying Data in a Windows Form Using a Parameterized Query Sounds simple but for some reason when I get to the step where you are supposed to 'Expand the (DataBindings) node, and for the Text property, expand DsAuthors1, expand authors, and select au_id from the drop-down list. I don't have a drop down list?! It's empty Please help me find what I'm missing here I have the following on my form OdbcDataAdapter with a simple select command 'SELECT MBR_SAID, MBR_SURNAME, MBR_ADDR1 FROM FHP_MBR WHERE (MBR_SAID = ?) OdbcConnection (to an Access database and a DataSet (dsMbr The following code is for the button click Private Sub Button1_Click_1 (ByVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Clic OdbcDataAdapter 1.SelectCommand .Parameters("mb r_said").Value = dfnMbr_said.Tex dsMbr.Clear( OdbcDataAdapter 1.Fill(dsMbr End Su So what am I missing here please? I know it's probably simple... I just need a jumpstart How do I bind the results of this query to the appropriate fields I am using the VB.Net Standard edition and have therefore had to export my Oracle tables into Access for the purpose of this excercise since I believe you need the full blown Enterprise edition of Visual Studio to connect to Oracle Thanks Marnie
Hi,
It should. I dont think you need the mbr. Try this.
dfsMbr_Surname. DataBindings.Ad d(New Binding("Text", dsMbr, "mbr_surnam e"))
Ken
-------------------
"Marnie" <an*******@disc ussions.microso ft.com> wrote in message
news:B8******** *************** ***********@mic rosoft.com... Hi Ken, Thanks for your response.
I did try using something similar to that ie:
Protected Sub BindControls() dfsMbr_Surname. DataBindings.Ad d(New Binding("Text", dsMbr, "mbr.mbr_surnam e")) End Sub
Should that work too?
Although I wasn't sure then where to call BindControls() from? Where are you suggesting to put the code: TextBox2.DataBi ndings.Add("Tex t", ds.Tables(0), "CategoryNa me")
Does Tables(0) select the first table (being the only one in my case) in the query?
I thought that I was going to be able to do this by going through the properties of TextBox2 (in my case dfsMbr_Surname) as per the documentation. I assume the code you gave me is generated for you if you do it through the properties dialog? Still wondering why nothing appeared in the Data Bindings section of the datafield properties? Thanks, Marnie. ----- Ken Tucker [MVP] wrote: -----
Hi,
To bind a textbox to a datasource. This will bind the CategoryName field of a dataset ds to textbox2.
TextBox2.DataBi ndings.Add("Tex t", ds.Tables(0), "CategoryNa me")
To use the oracle data provider you need to add a reference to system.data.ora cleclient.dll. http://msdn.microsoft.com/library/de...sctorTopic.asp
Ken ------------------
"Marnie" <an*******@disc ussions.microso ft.com> wrote in message news:43******** *************** ***********@mic rosoft.com... > Hi there, > I am new to VB.Net (formerly a Centura 'Gupta' programmer) and just trying > to do a simple excercise out of the help to populate a couple of text > fields on a form by using a parameterized query.. > ie. Walkthrough 'Displaying Data in a Windows Form Using a Parameterized > Query' > Sounds simple but for some reason when I get to the step where you are > supposed to 'Expand the (DataBindings) node, and for the Text property, > expand DsAuthors1, expand authors, and select au_id from the drop-down > list.' > I don't have a drop down list?! It's empty. > Please help me find what I'm missing here! >> I have the following on my form: > OdbcDataAdapter with a simple select command 'SELECT MBR_SAID, > MBR_SURNAME, MBR_ADDR1 FROM FHP_MBR WHERE (MBR_SAID = ?)' > OdbcConnection (to an Access database) > and a DataSet (dsMbr) >> The following code is for the button click: > Private Sub Button1_Click_1 (ByVal sender As System.Object, ByVal e As > System.EventArg s) Handles Button1.Click > OdbcDataAdapter 1.SelectCommand .Parameters("mb r_said").Value = > dfnMbr_said.Tex t > dsMbr.Clear() > OdbcDataAdapter 1.Fill(dsMbr) > End Sub >> So what am I missing here please? I know it's probably simple... I just > need a jumpstart! > How do I bind the results of this query to the appropriate fields? > I am using the VB.Net Standard edition and have therefore had to export my > Oracle tables into Access for the purpose of this excercise since I > believe you need the full blown Enterprise edition of Visual Studio to > connect to Oracle. > Thanks, > Marnie. > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: RPI_alum |
last post by:
I've been experiencing some frustrating behavior that I believe may be a MS bug in the Framework. Has anyone else experienced this, know a better way to resolve it, or if it is an actual MS bug
*) I have a DataSet containing 2 tables, A and B
*) There is a 1-to-1 relation between the tables with table A being the parent. (ABrel
*) A DataView is created on table A to allow filtering of the result se
*) 2 Text Boxes are created and Bound...
|
by: Lloyd Sheen |
last post by:
I am having trouble with an app that does the following:
1. Query SQL Server and return one row
2. Bind the columns to text boxes
3. User updates info
4. User clicks update button
Questions:
1. Is data binding one direction.
|
by: Marty U. |
last post by:
I am building a 3 level deep heirarchy tree for an application requirement. I
need the ability at any level to add an item to the tree. However, when
something is added all 3 levels must be completed.
Example:
If you are on level 1 you would see 3 text boxes to complete.
If level 2 then the first box would be populated with information pertaining
to the first item you clicked.
level 3 would have the first two boxes populated with the...
|
by: Lance Geeck |
last post by:
Hi,
I am trying to learn the VB.NET approach and am having problems with
updating the database. What I have is a simple windows form using text
boxes for entering name, address and phone. It is using a web service to
load the dataset and update the data.
Here is what I am doing.
I have an existing record in the database.
I created a datagrid bound to the dataset.
|
by: Rodney Lane |
last post by:
Hi,
I am using an oledb data adapter to connect to an MSAccess 2003 database. I
use bindings on my windows forms to bind fields to the controls and for text
boxes and grids it has been fine.
I am having problems with binding to a check box. It works fine until I
attempt to add a new record to the dataset through the binding context
object.
| |
by: Simon Verona |
last post by:
I'm not sure if I'm going down the correct route...
I have a class which exposes a number of properties of an object (in this
case the object represents a customer). Can I then use this object to
databind to text boxes etc?
I can't use a dataset as the object has loads of derived logic, for example
updating one property may actually update several database fields for
example.
|
by: Richard |
last post by:
I have created a form which sets up a dataview. The form views one
record at a time using a currencymanager. This works fine. All my
text boxes bind.
However I have a combo box which gets its lookup values from another
(Advertising) table (AdvertisingID, Advertising). This works
.. However, where it doesn't work as well is when the form
loads, the combo boxes should bind to the AdvertisingID field and
display the respective data.
|
by: Max |
last post by:
Hello,
I made a windows form with a combo box and 4 text boxes. All 5 objects should get their data from a data set which is populated
in the form load method. The combo box has item ids. When the users selects an item from the combo box I'd like the 4 text boxes to
get populated with the corresponding item information from the same dataset table row that the combo box is pulling it's info from.
Is there an easy way of doing this besides...
|
by: Dawnyy |
last post by:
I have a form which is bound to a dataset. I am filling the forms dataset on Form_Load event.
On my form I have combo boxes which I am setting by running a stored procedure to return a datatable, which I then assign to the datasource.
Some of my combo box datasources depend on values in other fields to limit the options.
For example, I have a sales rep list that is limited by the customer selected in the customers combo box.
And...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |