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

问题描述

当我将数据插入SQL数据库时,Microsoft SQL服务器管理器在编辑行中只显示一条记录,但在选择前1000行中显示所有记录哪里有问题?我做错了什么?

[]



谢谢



我尝试过:



这是我的代码:

Dim VLOZ作为新的SqlCommand(INSERT INTO TECH_TEST(CISLO_S,STROJ,PROJEKT)> br $>

Hi, when I insert data into SQL database Microsoft SQL server manager show me in edit rows only one record but in select top 1000 rows show me all records where is a problem? What Iam doing wrong?
Imgur: Image[^]

Thank you

What I have tried:

Here is my code:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
       Dim VLOZ As New SqlCommand("INSERT INTO TECH_TEST (CISLO_S, STROJ, PROJEKT) VALUES(@CISLO_S,@STROJ,@PROJEKT)", CONNECTION)

       VLOZ.Parameters.AddWithValue("@CISLO_S", TextBox3.Text)
       VLOZ.Parameters.AddWithValue("@STROJ", TextBox4.Text)
       vloz.Parameters.AddWithValue("@PROJEKT", TextBox5.Text)
       CONNECTION.Open()
       If VLOZ.ExecuteNonQuery() = 1 Then
           MsgBox("přidáno")
           Label1.Text = "HOTOVO"
       Else
           MsgBox("existuje")
       End If

       clear()
       Label1.Text = ""
       CONNECTION.Close()

推荐答案


这篇关于插入SQL数据库并在ms SQL中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 18:12
查看更多