473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Data member could not be found

hello to all
well i was just populating my combobox with an dataset programatically in runtime.. using visual studio 2005 beta and sql 2000..
code is as follows...

Dim cn As New SqlConnection
Dim ds As New System.Data.DataSet
Dim mybs As New BindingSource
cn.ConnectionString = "Data Source=PSERVER;Initial Catalog=Incoms;Integrated Security=True"
Try
cn.Open()
Dim da As New SqlDataAdapter("Select * from TRespondent_master", cn)

da.Fill(ds, "TRespondent_master")
mybs.DataSource = ds.Tables(0)
'mybs.DataMember = ds.Tables(0).ToString
cmbPa.DataSource = mybs
'cmbPa.DataBindings.Add(New Binding("DisplayMember", ds, "pa_name"))
'cmbPa.DataBindings.Add(New Binding("valuemember", ds, "Respondent_id"))

' >>>the following line executes without error
cmbPa.DisplayMember = "TRespondent_Master.PA_name"
'>>>> the following line gives error Datamember property could not be found on the datasource
cmbPa.ValueMember = "TRespondent_Master.Respondent_id"
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
cn.Close()
End Try

can any one help me with this...
Jan 11 '07 #1
0 926

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Bob Hairgrove | last post by:
The following class contains start and end points of a range of values. The range can have a direction which is implied from the relative order of start and end, or it can be without direction. IOW...
24
by: Steven T. Hatton | last post by:
In the following code, at what point is S::c fully defined? #include <iostream> using std::cout; using std::endl; using std::ostream; class C { int _v;
6
by: blueblueblue2005 | last post by:
here is a friend function of Class Array, which has two private data member: int size, int *ptr // Array's public member function to return size int getSize() const { return size; } friend...
4
by: Thomas Paul Diffenbach | last post by:
Can anyone point me to an open source library of /statically allocated/ data structures? I'm writing some code that would benefit from trees, preferably self balancing, but on an embedded system...
5
by: Peter Olcott | last post by:
I created an object that requires access to another objects data, yet have found no good way to pass this data as a parameter because the member function that requires this data must be a binary...
0
by: meetmaruthi | last post by:
Hai i am searching a database (in ms access ) to validate user info.it has two fields username and password. here is the coding and i get compile error:Method or data member not found.please help...
31
by: aarklon | last post by:
Hi all, this is a question which i saw in a book typedef struct mall_li_header_ { int refcnt; uchar pool; uchar flag; ushort magic_no; char data;
3
by: zaeminkr | last post by:
I have class member data which is a pointer to class member function. However, I'm fail to compile the code. What is the correct grammar to make a function call by using static member data...
1
by: almeister9 | last post by:
I am hoping someone can help me as I've done this sort of thing before with no problems. I am using Access 2003 SP2 on WinXP prof SP2 I have an unbound form (single form view) with 18 unbound text...
15
by: akomiakov | last post by:
Is there a technical reason why one can't initialize a cost static non- integral data member in a class?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
marktang
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,...
0
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...
0
Oralloy
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.