Weblogs Código

RecorteX

73 usuarios y 244 recortes de código
Usuario

Contraseña
Crear cuenta
asp csharp css fechas Flash html imagenes java javascript linux mysql oracle php sql SQLServer url vbnet web xhtml xml
Top Usuarios
fjmp76 (43)
albin (31)
josuebasurto (31)
juanjo (30)
pedrocaro (9)
stanz (8)
AndiXTRM (7)
Joserra (7)
miiglesi (6)
aplyca (5)
Top Etiquetas
php (38)
vbnet (28)
javascript (26)
csharp (26)
html (25)
java (24)
sql (18)
xml (13)
mysql (13)
css (10)
xhtml (7)
Flash (7)
imagenes (7)
linux (6)
fechas (6)
asp (6)
oracle (5)
url (5)
web (5)
SQLServer (5)

Traer un DT desde un query en SqlServer

 
    Private Function getDT(ByVal qry As String, ByVal connectionString as string) As DataTable
        Dim dataSet As DataSet = New DataSet
        Dim conn As New SqlConnection(connectionString)
        Dim cmdString As String = qry
        Dim dataAdapter As New SqlDataAdapter(cmdString, conn)
        Dim ds As New DataSet()
        dataAdapter.Fill(ds, "dt")
 
        Return ds.Tables("dt")
    End Function
 
 
    private DataTable getDT(String qry, String  connectionString)
    {
        DataSet dataSet = new DataSet();
        SqlConnection conn = new SqlConnection(connectionString);
        SqlDataAdapter dataAdapter = new SqlDataAdapter(qry, conn);
        DataSet ds= new DataSet();
        dataAdapter.Fill(ds, "dt");
  
        return ds.Tables ["dt"];
    }
 
Identifícate para dejar un comentario.
Proyecto: Juanjo Navarro, 2006 - Diseño: Albin