Results 1 to 2 of 2

Thread: How to MS SQL Server Connection ?

  1. #1
    haylazzz is offline VB.NET Forum Newbie
    .NET Framework
    .NET 4.0
    Join Date
    Oct 2013
    Posts
    1
    Reputation
    0

    How to MS SQL Server Connection ?

    Hello.

    I'm using vb.net language.My Applications made Windows Form. silverlight for the first time and want to do the project.using gridview in my project. MS SQL Server to connect to the data you need to bring to the Grid.I'm as windows forms project.

    Dim connectionString As String = "data source=SERVERNAME;initial catalog=DATABASE;persist security info=False;uid=sa;pwd=sapass;"
    Dim sqlConnection As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(connectionStri ng)
    Dim sqltext As String


    sqltext = " SELECT * FROM TBLSTSABIT"


    Dim MAMULCMD As System.Data.SqlClient.SqlCommand = New System.Data.SqlClient.SqlCommand(sqltext, sqlConnection)
    Dim MAMULADP As System.Data.SqlClient.SqlDataAdapter = New System.Data.SqlClient.SqlDataAdapter(MAMULCMD)
    Dim MAMUL As System.Data.DataSet = New System.Data.DataSet
    MAMULADP.Fill(MAMUL, "TABLO")



    datagrid.DataSource = MAMUL
    datagrid.DataMember = "TABLO"
    datagrid.Refresh()


    But ;

    silverlight application, how can I do this operation.Sorry my english is a little bad. Waiting for your help.

    Thankss...

  2. #2
    coolzero22 is offline VB.NET Forum Newbie
    .NET Framework
    .NET 2.0
    Join Date
    Aug 2013
    Posts
    8
    Reputation
    0
    Dim MAMULCMD As New SqlDataAdapter("select * from TBLSTSABIT", sqlConnection)
    Dim
    MAMUL as new Datatable
    MAMULCMD .fill(MAMUL)

    datagrid.DataSource=MAMUL

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •