Hello all,
I have a vb6 (not .NET) program using MS Access as the backend. As part of
an import form, I need to allow the user to select the table containing the
data to be imported. How can I populate a combo with this information?
Then, once this value is selected, how can I populate other combos with the
column names of the selected table?
Thanks,
Steven Smith 6 2445
Hi,
Maybe this will help. http://www.vb-tips.com/default.aspx?...c-e9d7983c1e05
Ken
----------------
"Steven Smith" <sl****@webbox.com> wrote in message
news:73**************@twister.nyroc.rr.com... Hello all,
I have a vb6 (not .NET) program using MS Access as the backend. As part of an import form, I need to allow the user to select the table containing the data to be imported. How can I populate a combo with this information? Then, once this value is selected, how can I populate other combos with the column names of the selected table?
Thanks,
Steven Smith
Thanks Ken... it wasn't quite what I needed, but it pointed me in the right
direction.
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in
news:eZ**************@TK2MSFTNGP05.phx.gbl: Hi,
Maybe this will help.
http://www.vb-tips.com/default.aspx?...-8c6c-e9d7983c 1e05
Ken ---------------- "Steven Smith" <sl****@webbox.com> wrote in message news:73**************@twister.nyroc.rr.com... Hello all,
I have a vb6 (not .NET) program using MS Access as the backend. As part of an import form, I need to allow the user to select the table containing the data to be imported. How can I populate a combo with this information? Then, once this value is selected, how can I populate other combos with the column names of the selected table?
Thanks,
Steven Smith
Steven,
Somebody else was asking the same question, maybe we should extend our
sample with the schema information. http://msdn2.microsoft.com/en-us/lib...fh(VS.80).aspx
But using that sample the schema option easy to find and it works the same..
I hope this helps,
Cor
"Steven Smith" <sl****@webbox.com> schreef in bericht
news:_v****************@twister.nyroc.rr.com... Thanks Ken... it wasn't quite what I needed, but it pointed me in the right direction. "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in news:eZ**************@TK2MSFTNGP05.phx.gbl:
Hi,
Maybe this will help.
http://www.vb-tips.com/default.aspx?...-8c6c-e9d7983c 1e05
Ken ---------------- "Steven Smith" <sl****@webbox.com> wrote in message news:73**************@twister.nyroc.rr.com... Hello all,
I have a vb6 (not .NET) program using MS Access as the backend. As part of an import form, I need to allow the user to select the table containing the data to be imported. How can I populate a combo with this information? Then, once this value is selected, how can I populate other combos with the column names of the selected table?
Thanks,
Steven Smith
> Somebody else was asking the same question, maybe we should extend our sample with the schema information.
I forgot to type it complete, therefore the link was still in my clipboard.
On Mon, 17 Apr 2006 20:40:35 GMT, Steven Smith <sl****@webbox.com> wrote:
¤ Hello all,
¤
¤ I have a vb6 (not .NET) program using MS Access as the backend. As part of
¤ an import form, I need to allow the user to select the table containing the
¤ data to be imported. How can I populate a combo with this information?
¤ Then, once this value is selected, how can I populate other combos with the
¤ column names of the selected table?
¤
List of Tables:
Dim DatabaseConnection As New System.Data.OleDb.OleDbConnection
Dim SchemaTable As DataTable
DatabaseConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Test Files\db1 XP.mdb"
DatabaseConnection.Open()
SchemaTable =
DatabaseConnection.GetOleDbSchemaTable(System.Data .OleDb.OleDbSchemaGuid.Tables, _
New Object() {Nothing, Nothing, Nothing,
Nothing})
Dim RowCount As Int32
For RowCount = 0 To SchemaTable.Rows.Count - 1
TableListCombo.Items.Add(SchemaTable.Rows(RowCount )!TABLE_NAME.ToString)
Next RowCount
DatabaseConnection.Close()
List of Columns:
Dim DatabaseConnection As New System.Data.OleDb.OleDbConnection
Dim SchemaTable As DataTable
DatabaseConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Test Files\db1 XP.mdb"
DatabaseConnection.Open()
SchemaTable =
DatabaseConnection.GetOleDbSchemaTable(System.Data .OleDb.OleDbSchemaGuid.Columns, _
New Object() {Nothing, Nothing, "Table1"})
Dim RowCount As Int32
For RowCount = 0 To SchemaTable.Rows.Count - 1
ColumnListCombo.Items.Add(SchemaTable.Rows(RowCoun t)!COLUMN_NAME.ToString)
Next RowCount
DatabaseConnection.Close()
Paul
~~~~
Microsoft MVP (Visual Basic)
Thanks!
Paul Clement <Us***********************@swspectrum.com> wrote in
news:af********************************@4ax.com: On Mon, 17 Apr 2006 20:40:35 GMT, Steven Smith <sl****@webbox.com> wrote:
¤ Hello all, ¤ ¤ I have a vb6 (not .NET) program using MS Access as the backend. As part of ¤ an import form, I need to allow the user to select the table containing the ¤ data to be imported. How can I populate a combo with this information? ¤ Then, once this value is selected, how can I populate other combos with the ¤ column names of the selected table? ¤
List of Tables:
Dim DatabaseConnection As New System.Data.OleDb.OleDbConnection Dim SchemaTable As DataTable
DatabaseConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\Test Files\db1 XP.mdb"
DatabaseConnection.Open()
SchemaTable = DatabaseConnection.GetOleDbSchemaTable(System.Data .OleDb.OleDbSchemaGui d.Tables, _ New Object() {Nothing, Nothing, Nothing, Nothing})
Dim RowCount As Int32 For RowCount = 0 To SchemaTable.Rows.Count - 1 TableListCombo.Items.Add(SchemaTable.Rows(RowCount )!TABLE_N AME.ToString) Next RowCount
DatabaseConnection.Close()
List of Columns:
Dim DatabaseConnection As New System.Data.OleDb.OleDbConnection Dim SchemaTable As DataTable
DatabaseConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\Test Files\db1 XP.mdb"
DatabaseConnection.Open()
SchemaTable = DatabaseConnection.GetOleDbSchemaTable(System.Data .OleDb.OleDbSchemaGui d.Columns, _ New Object() {Nothing, Nothing, "Table1"})
Dim RowCount As Int32 For RowCount = 0 To SchemaTable.Rows.Count - 1 ColumnListCombo.Items.Add(SchemaTable.Rows(RowCoun t)!COLUMN _NAME.ToString) Next RowCount
DatabaseConnection.Close()
Paul ~~~~ Microsoft MVP (Visual Basic) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: X |
last post by:
Howdy:
To follow up on a problem with MS Access (2000)
and Oracle 9i (9.2.0.x) -
History:
I am trying to import tables from my Oracle 9i database on
RedHat Linux 7.2 to MS Access (2000) on...
|
by: Paul |
last post by:
Hi
I have a problem with the DataGrid Datasource.
The issue is this, setting the grid DataSource to Table1, which is done
when the page loads and then changing the datasource to a different...
|
by: EMW |
last post by:
Hi,
I managed to create a SQL server database and a table in it. The table is
empty and that brings me to my next chalenge:
How can I get the info in the table in the dataset to go in an empty...
|
by: Mel |
last post by:
Hi,
I created a form that would search a record from a table
and showed the details in datagrid. I have another button
that would insert the records showed in the datagrid to
another table..How...
|
by: robboll |
last post by:
Please excuse my ignorance, but I am trying to teach myself .Net
without a lot of help. At this point I have created a page with a few
text boxes and combo boxes that I am using as an example.
...
| |
by: Kay |
last post by:
Hi all,
I have populated a dataset with several tables, say - Roster, Agent and few
more . The dataset is used to populated a listview with some shift info..
I think I'm sucessfully created a...
|
by: Steven Smith |
last post by:
Hello all,
I have a vb6 (not .NET) program using MS Access as the backend. As part of
an import form, I need to allow the user to select the table containing the
data to be imported. How can I...
|
by: Gregory Gadow |
last post by:
If there is a more appropriate forum, please let me know and I will post
there.
Our field reps can go on to our website and select from several sets of
data to create the address we then provide...
|
by: zufie |
last post by:
I want to use SQL code to Create a Table & Provide a Default Value for
Each Column.
Here is the code I am using:
CREATE TABLE customer
(First_Name char(50),
Last_Name char(50),
Address...
|
by: Icemokka |
last post by:
Hi,
I've got a table in MsAccess with 100+ fields.
If I fill a tabletable with this table , change some values , get the
update-command via commandbuilder , the update fails.
This because the...
|
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,...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
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...
| |