| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 321 人关注过本帖
标题:[求助]vb.net 向数据库添加记录
只看楼主 加入收藏
yzwushidong
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2007-9-29
收藏
 问题点数:0 回复次数:1 
[求助]vb.net 向数据库添加记录
Dim a, b, c As String
a = cmbzhuangtai.SelectedIndex.ToString
b = cmbshifoupaigong.SelectedIndex.ToString
c = cmbyewuleixing.SelectedIndex.ToString
dt = Dsgaihao1.Tables("shenqinggaihao")
dr = dt.NewRow()
dr(0) = txtdanwei.text
dr(1) = txtyonghumingcheng.Text
dr(2) = txtshenqingren.Text
dr(3) = txtlianxidianhua.Text
dr(4) = txtlianxiren.Text
dr(5) = txtshenqingxiangmu.Text
dr(6) = c
dr(7) = txtdianhuahaoma.Text
dr(8) = txtzhuangjidizhi.Text
dr(9) = txtfenpeixinhaoma.Text
dr(10) = txtpizhunlingdao.Text
dr(11) = txtshoulishijian.Text
dr(12) = txtshoulingren.Text
dr(13) = txtshouliren.Text
dr(14) = b
dr(15) = a
dr(16) = rxbeizhu.Text
dt.Rows.Add(dr)
OleDbDataAdapter1.Update(Dsgaihao1, "shenqinggaihao")
OleDbDataAdapter1.Fill(Dsgaihao1)
bm.position = 0


向数据库里添加记录的 但是提示找不到第15例 可我明明有的啊

各位帮帮忙咯
搜索更多相关主题的帖子: 数据库 记录 
2007-10-05 10:17
yaogege
Rank: 1
等 级:新手上路
帖 子:34
专家分:0
注 册:2007-7-12
收藏
得分:0 

是不是数据类型错误?

2007-10-05 10:51
快速回复:[求助]vb.net 向数据库添加记录
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015062 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved