Dear Sirs,
I am using following codes to have a list box in form. When I run that form
as a start up object, I have no problem.
I have a MDI parent form which has user login feature. To confirm user
password MDI parent form is connecting users.mdb. When I run my project with
MDI Parent form as a start up object, I can not same result with list box
which is on the different form page as MDI Child Form. List box shows to me;
System.Data.Row.View for each record.
Where is my error, any idea.
Chil form codes;
'OleDbSelectCommand1
'
Me.OleDbSelectCommand1.CommandText = "SELECT Explanation, Main_Category FROM
AuditMainCategory"
Me.OleDbSelectCommand1.Connection = Me.OleDbConnection1
'OleDbConnection1
'
OleDbConnection1.ConnectionString = "Jet OLEDB:Global Partial Bulk Ops=2;Jet
OLEDB:Registry Path=;Jet OLEDB:Database L" & _
"ocking Mode=1;Jet OLEDB:Database Password=;Data Source=" & CurDir() &
"\Data\Support.mdb" & ";Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global"
& _
" Bulk Transactions=1;Provider=""Microsoft.Jet.OLEDB.4.0" ";Jet OLEDB:System
databas" & _
"e=;Jet OLEDB:SFP=False;Extended Properties=;Mode=Share Deny None;Jet
OLEDB:New D" & _
"atabase Password=;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't
Copy Lo" & _
"cale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User
ID=Adm" & _
"in;Jet OLEDB:Encrypt Database=False"
'OleDbDataAdapter1
'
Me.OleDbDataAdapter1.SelectCommand = Me.OleDbSelectCommand1
Me.OleDbDataAdapter1.TableMappings.AddRange(New
System.Data.Common.DataTableMapping() {New
System.Data.Common.DataTableMapping("Table", "AuditMainCategory", New
System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("Explanation" , "Explanation"), New
System.Data.Common.DataColumnMapping("Main_Categor y", "Main_Category")})})
'
Dim AuditMainCategory_ds As DataSet = New DataSet
Me.OleDbDataAdapter1.Fill(AuditMainCategory_ds, "AuditMainCategory")
' Attach dataset's DefaultView to the datagrid control
Dim AuditMainCategory_dv As DataView =
AuditMainCategory_ds.Tables("AuditMainCategory").D efaultView
Me.ListBox1.DataSource = AuditMainCategory_dv
Me.ListBox1.DisplayMember = "Main_Category" 1 1400
Hi,
Try this.
Dim AuditMainCategory_dv As DataView = New
DataView(AuditMainCategory_ds.Tables("AuditMainCat egory"))
Ken
-------------
"QT" <we*****@yahoo.com> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl... Dear Sirs,
I am using following codes to have a list box in form. When I run that form as a start up object, I have no problem.
I have a MDI parent form which has user login feature. To confirm user password MDI parent form is connecting users.mdb. When I run my project with MDI Parent form as a start up object, I can not same result with list box which is on the different form page as MDI Child Form. List box shows to me; System.Data.Row.View for each record.
Where is my error, any idea.
Chil form codes;
'OleDbSelectCommand1
'
Me.OleDbSelectCommand1.CommandText = "SELECT Explanation, Main_Category FROM AuditMainCategory"
Me.OleDbSelectCommand1.Connection = Me.OleDbConnection1
'OleDbConnection1
'
OleDbConnection1.ConnectionString = "Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database L" & _
"ocking Mode=1;Jet OLEDB:Database Password=;Data Source=" & CurDir() & "\Data\Support.mdb" & ";Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global" & _
" Bulk Transactions=1;Provider=""Microsoft.Jet.OLEDB.4.0" ";Jet OLEDB:System databas" & _
"e=;Jet OLEDB:SFP=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:New D" & _
"atabase Password=;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Lo" & _
"cale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Adm" & _
"in;Jet OLEDB:Encrypt Database=False"
'OleDbDataAdapter1
'
Me.OleDbDataAdapter1.SelectCommand = Me.OleDbSelectCommand1
Me.OleDbDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "AuditMainCategory", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("Explanation" , "Explanation"), New System.Data.Common.DataColumnMapping("Main_Categor y", "Main_Category")})})
'
Dim AuditMainCategory_ds As DataSet = New DataSet
Me.OleDbDataAdapter1.Fill(AuditMainCategory_ds, "AuditMainCategory")
' Attach dataset's DefaultView to the datagrid control
Dim AuditMainCategory_dv As DataView = AuditMainCategory_ds.Tables("AuditMainCategory").D efaultView
Me.ListBox1.DataSource = AuditMainCategory_dv
Me.ListBox1.DisplayMember = "Main_Category"
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Neil Ginsberg |
last post by:
We're using SQL Server 7 with an Access 2000 MDB as a front end with ODBC
linked tables. I recently created a new set of tables for the app, and users
are complaining that unsaved data is being...
|
by: Ed B |
last post by:
I've been trying to connect to SQL Server 2000 through a web form created in
c#. As I created my connection object the data source test succeeded. I've
even tried the datapage wizard and I get...
|
by: Brian F |
last post by:
Exactly what the subject says.
I have an ASP page that I want my C# windows application to open in
Internet Explorer, and if possible have it send along a list of values
from a list box. Thank you.
|
by: Alex Sibilev |
last post by:
Hello,
I have a really weird problem I've been trying to solve it without any luck
for the last couple of hours :(
I'm writing a "conference board" application (quite similar to ASP.NET...
|
by: Vishal |
last post by:
Hello,
I already asked this question in the ASP.NET forums,
but no help came. So I am hoping that somebody can help me
out. This is really very URGENT me.
For my e-commerce application, I...
|
by: pete |
last post by:
Help, I can not find this data wizard in my toolbox under data.
To generate a dataset
1.. From the Data menu, choose Generate DataSet.
Tip If you do not see the Data menu, click in the...
|
by: BobAchgill |
last post by:
Is there a way to let the User click on a button on a web
site and have that download and install my prepackaged
compressed data directory and place it nicely under my
existing VB .Net Form...
|
by: dbuchanan |
last post by:
Hello,
A section in Data Sources window is mystifying to me.
In the case of my code the Data Sources window shows my references to
the data access layer.
First here is what I see in my Data...
|
by: mjsterz |
last post by:
I've been working with VB .NET for less than a year and this is the
first time I've posted on one of these groups, so let me apologize
beforehand if I'm being unclear, not posting my issue...
|
by: sufian |
last post by:
I am new to the world of PHP. Below is my simple PHP file "invite.php" with a form having an image send button (I have to use the image send button because it is the requirement, may be this is...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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: 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...
| |