在数据库中显示生成的文本框数据 [英] displaying generated textbox data in database

查看:89
本文介绍了在数据库中显示生成的文本框数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个代码,当用户在ComboBox中选择2时,会自动在文本框中输入0,因此想知道这些0的代码将显示在数据库中。

I have a code which automatically input 0 in textboxes when a user chooses 2 in ComboBox, so would like to know the code for those 0's to be displayed in database.

Private Sub ComboBox2_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.Leave
        If Me.ComboBox2.Text = "1" Then
            Me.TextBox19.Focus()
        Elseif Me.ComboBox2.Text = "2" Then
            Me.TextBox19.Text = "0"
            Me.TextBox20.Text = "0"
            Me.TextBox21.Text = "0"
            Me.TextBox22.Text = "0"

            'Me.TextBox23.Enabled = False
            'Me.TextBox24.Enabled = False
            Me.TextBox26.Focus()
        End If
    End Sub

推荐答案

根据评论,使用SqlCommand SqlConnection对象。



很高兴听到我们可以关闭这个。
As per the comments, use the SqlCommand SqlConnection objects.

Glad to hear we can close this one out.


这篇关于在数据库中显示生成的文本框数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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