Highlighted
Absent Member.
Absent Member.
1489 views

Combo Box

Jump to solution

[Migrated content. Thread originally posted on 21 April 2011]

What is the code to Add Items to Combobox on Visual Cobol. I'm RM-Cobol User, now I have to play with SQL DATA BASE, Can I gen one example how to create one file, how I can read it and Add it's records to ComboBox.
jose61@pryma.ws
Thanks for your help.
0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Combo Box

Jump to solution
Hi,

I e-mailed you an example program which will create a SQL table in a SQL Server database and then bind the data to a combobox control.

The binding part is simple:

set comboBox1::DataSource to wsDataset::Tables::Item("MFCustomers")
set comboBox1::DisplayMember to "CompanyName"

wsDataset will be an ADO.NET dataset which is filled with the rows of the MFCustomers data table.
Simply set the DataSource property to the name of the table in the dataset.
Set the DisplayMember property to the name of the column to bind to in the specified table.

The rest of the sample shows how to use the EXEC SQL and EXEC ADO COBOL syntax to create a new table and then fill a dataset with its data.


Let me know if you have any questions or if this isn't what you are looking for.

View solution in original post

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Combo Box

Jump to solution
Hi,

I e-mailed you an example program which will create a SQL table in a SQL Server database and then bind the data to a combobox control.

The binding part is simple:

set comboBox1::DataSource to wsDataset::Tables::Item("MFCustomers")
set comboBox1::DisplayMember to "CompanyName"

wsDataset will be an ADO.NET dataset which is filled with the rows of the MFCustomers data table.
Simply set the DataSource property to the name of the table in the dataset.
Set the DisplayMember property to the name of the column to bind to in the specified table.

The rest of the sample shows how to use the EXEC SQL and EXEC ADO COBOL syntax to create a new table and then fill a dataset with its data.


Let me know if you have any questions or if this isn't what you are looking for.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.