03/08/2012, 18:37
|
| | Fecha de Ingreso: junio-2011
Mensajes: 329
Antigüedad: 13 años, 6 meses Puntos: 2 | |
Respuesta: Variable global Ya resolvi lo del sql data source....gracias..una ultima pregunta..si lo hago por codigo ..seria igual..?
antes
-----------------------------------------------------------------------
Dim cmd As SqlCommand
Dim MyConnection2 As SqlConnection
MyConnection2 = New SqlConnection("Data Source=192.168.10.20;Initial Catalog=sistemas;User ID=sa;Password=stm01")
MyConnection2.Open()
cmd = New SqlCommand("SELECT comentarios FROM [comentarios] ", MyConnection2)
TextBox12.Text = cmd.ExecuteScalar()
MyConnection2.Close()
despues:
----------------------------------------------------------
Dim cmd As SqlCommand
Dim MyConnection2 As SqlConnection
MyConnection2 = New SqlConnection("Conexion")
MyConnection2.Open()
cmd = New SqlCommand("SELECT * FROM [usuarios] ", MyConnection2)
TextBox1.Text = cmd.ExecuteScalar()
MyConnection2.Close() |