combox和数据绑定 [英] combox and databinding

查看:118
本文介绍了combox和数据绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何将我的组合框连接到我的

acces DB?我已经尝试将数据源设置为

数据集,但我似乎无法在DataBindings列表下找到item属性



我最终绑定text属性,但组合框

仍未填充。无论如何我每次点击选项卡控件

在我的表格上刷新

数据?

thx。

解决方案

嗨伊娃


您是否也设置了显示成员?

有谁知道如何将我的组合框连接到我的
访问数据库?我已经尝试将数据源设置为
数据集但我似乎无法在DataBindings列表下找到item属性




Cor


" EVA" <一个******* @ discussions.microsoft.com> schrieb

有谁知道如何将我的组合框连接到我的
访问数据库?我已经尝试将数据源设置为
数据集,但我似乎无法在DataBindings列表下找到item属性
我最终绑定了text属性,但是组合框
仍然无人居住。无论如何我每次点击我的表格上的标签控件
时都可以刷新存储在这里的数据吗?




这个问题不是VB.NET特定的,请转到

microsoft.public.dotnet.framework.windowsforms.dat abinding

-

Armin

http://learn.to/quote http://www.plig.net/nnq/nquote.html


您好Cor,


是的,我将数据库设置为我需要的列。

我有finnaly得到详细信息,但是,我保持

在表单首次打开时收到以下消息:


未处理的异常

类型''System.Data.ConstraintException''发生在

system.data.dll


我所做的全部是在查询前面写清楚
消除重复行。我的询问是:


SELECT Distinct [Caravan Model]

FROM [Caravan详情]

它似乎工作当我把:

SELECT [Caravan Model],[Caravan Inv No]

FROM [Caravan详情]


Caravan Inv No是主键。

知道我应该怎么做吗?

附加信息:无法启用约束。一行

或更多行包含违反非null,唯一,
或外键约束的值。

-----原始消息-----
你好伊娃

你也设置了显示成员吗?

有谁知道如何将我的组合框连接到我的
access DB?我已经尝试将数据源设置为
数据集,但我似乎无法在DataBindings列表下找到item属性



$



Does anyone know how i can connect my combobox to my
acces DB? i have tried setting the datasource to a
dataset but i cannot seem to locate the item property
under the DataBindings list.
I ended up binding the text property, but the combobox
remains unpopulated. Is there anyway i can refresh the
data stored in here every time i click on the tab control
on my form??
thx.

解决方案

Hi Eva

Did you set the displaymember too?

Does anyone know how i can connect my combobox to my
acces DB? i have tried setting the datasource to a
dataset but i cannot seem to locate the item property
under the DataBindings list.



Cor


"Eva" <an*******@discussions.microsoft.com> schrieb

Does anyone know how i can connect my combobox to my
acces DB? i have tried setting the datasource to a
dataset but i cannot seem to locate the item property
under the DataBindings list.
I ended up binding the text property, but the combobox
remains unpopulated. Is there anyway i can refresh the
data stored in here every time i click on the tab control
on my form??



As this question is not VB.NET specific, please turn to
microsoft.public.dotnet.framework.windowsforms.dat abinding
--
Armin

http://learn.to/quote
http://www.plig.net/nnq/nquote.html


Hi Cor,

yep i set the datamember to the column i needed.
I have finnaly got the details to appear but, i keep
getting the following message when the form first opens:

An unhandled exception of
type ''System.Data.ConstraintException'' occurred in
system.data.dll

All i did was to write distinct in front of the query to
eliminate duplicate rows. my query is:

SELECT Distinct [Caravan Model]
FROM [Caravan details]
It seems to work when i put:
SELECT [Caravan Model], [Caravan Inv No]
FROM [Caravan details]

Caravan Inv No is the Primary key.
Any idea what i should do?
Additional information: Failed to enable constraints. One
or more rows contain values violating non-null, unique,
or foreign-key constraints.

-----Original Message-----
Hi Eva

Did you set the displaymember too?

Does anyone know how i can connect my combobox to my
acces DB? i have tried setting the datasource to a
dataset but i cannot seem to locate the item property
under the DataBindings list.



Cor
.



这篇关于combox和数据绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆