| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 639 人关注过本帖
标题:vb中textbox中的值插到SQL中怎么做
取消只看楼主 加入收藏
huchenggong
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2006-4-12
收藏
 问题点数:0 回复次数:0 
vb中textbox中的值插到SQL中怎么做

该段程序是将VB中 一些TEXTBOX中的值 插入到 SQLSERVER2000 的数据库表中的一段程序<增加按钮>
可是当我在VB界面中的其中任何一个TEXTBOX中输入值后, 当离开TEXTBOX后该TEXTBOX值不见了成了空的 刚刚输入的值不见了 我设置过断点 在 下面<1>语句 运行时填如的值在此是空的 最后我插入在student 和 STUDENT_INFO中的值为两个空的记录 请问各位高手该怎么改~~ 在此先谢谢~~~
Private Sub cmdAdd_Click()
Dim cmd As Command
Set cmd = New Command

'表STUDENT中的数据

Dim S_NOval As String
Dim SEX_NAMEval As String
Dim GRADE_NAMEval As String
Dim YEARS_NAMEval As String
Dim S_NAMEval As String
Dim UNIT_NAMEval As String
Dim ID_NOval As String
Dim Addressval As String
Dim PostCodeval As String
Dim Max_centval As String
Dim CULTURE_NAMEval As String
Dim SPECIALTY_NAMEval As String

'表STUDENT_INFO中的数据
Dim BIRTHDAYval As String
Dim AREAS_NAMEval As String
Dim POLITICS_NAMEval As String
Dim POL_DAYval As String
Dim RACE_NAMEval As String
Dim NATIVEval As String
Dim GAT_NAMEval As String
Dim HEALTH_NAMEval As String
Dim RELIGION_NAMEval As String
Dim EMAILval As String
Dim REMARKval As String


'表STUDENT中的数据 赋值

<1> S_NOval = txtS_NO.Text
SEX_NAMEval = txtSEX_NAME.Text
GRADE_NAMEval = txtGRADE_NAME.Text
YEARS_NAMEval = txtYEARS_NAME.Text
S_NAMEval = txtS_NAME.Text
UNIT_NAMEval = txtUNIT_NAME.Text
ID_NOval = txtID_NO.Text
Addressval = txtAddress.Text
PostCodeval = txtPostCode.Text
Max_centval = txtMax_cent.Text
CULTURE_NAMEval = txtCULTURE_NAME.Text
SPECIALTY_NAMEval = txtSPECIALTY_NAME.Text

'表STUDENT_INFO中的数据 赋值
BIRTHDAYval = txtBIRTHDAY.Text
AREAS_NAMEval = txtAREAS_NAME.Text
POLITICS_NAMEval = txtPOLITICS_NAME.Text
POL_DAYval = txtPOL_DAY.Text
RACE_NAMEval = txtRACE_NAME.Text
NATIVEval = txtNATIVE.Text
GAT_NAMEval = txtGAT_NAME.Text
HEALTH_NAMEval = txtHEALTH_NAME.Text
RELIGION_NAMEval = txtRELIGION_NAME.Text
EMAILval = EMAIL.Text
REMARKval = txtREMARK.Text

搜索更多相关主题的帖子: SQL textbox 
2006-04-24 16:36
快速回复:vb中textbox中的值插到SQL中怎么做
数据加载中...
 
   



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

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