منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : ايجاد الداتا من Sql و اضافته في Textbox
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
السلام عليكم انا كنت عاوز اجيب داتا من Sql من Column معين و اضيفه في Textbox بس و جهتني مشكله جتلي رساله بتقولي 
CurLevel مع العلم CurLevel  دي اسم ال Column

اكوادي...

كود :
imports system.data.sqlclient
mysqlconn = New SqlConnection
       mysqlconn.ConnectionString = "Data Source=" + txtServerName.Text + ";initial catalog=" + txtdatabasename.Text + ";initial catalog=" + txtshardacc.Text + ";user id=" + textusername.Text + ";password=" + txtpassword.Text
       Dim queryresult As Integer




       Try


           mysqlconn.Open()
           command = New SqlCommand("select COUNT (*) as numRows from _Char Where CharName16='" & TextBox40.Text & "'", mysqlconn)
           queryresult = command.ExecuteScalar
           mysqlconn.Close()


           If queryresult = 0 Then
               MsgBox("charactername not found ", MsgBoxStyle.Critical, "Error")
           Else
               MsgBox("(1) Username Found " & TextBox40.Text, MsgBoxStyle.Information, "Done")
               TextBox29.Enabled = True
               TextBox30.Enabled = True
               TextBox31.Enabled = True
               TextBox32.Enabled = True
               TextBox32.Enabled = True
               TextBox33.Enabled = True
               TextBox34.Enabled = True
               TextBox35.Enabled = True
               TextBox36.Enabled = True
               TextBox37.Enabled = True
               TextBox38.Enabled = True
               TextBox39.Enabled = True
               Try
                   mysqlconn.Open()
                   Dim reader As SqlDataReader

                   reader = command.ExecuteReader
                   If reader.HasRows Then
                       TextBox39 = reader.Item("Curlevel")
                   End If

               Catch ex As Exception
                   MessageBox.Show(ex.Message)
               End Try
             

           End If
       Catch ex As Exception
           MessageBox.Show(ex.Message)
       End Try
   End Sub
(08-04-16, 11:07 PM)khodor1985 كتب : [ -> ]Textbox39.Text
أتمنى لك التوفيق

PHP كود :
  TextBox39.Textreader.Item("Curlevel")

نفس المشكله 

(08-04-16, 11:07 PM)khodor1985 كتب : [ -> ]Textbox39.Text
أتمنى لك التوفيق

PHP كود :
  TextBox39.Textreader.Item("Curlevel")

نفس المشكله 

نفس المشكله