• Hello and welcome to our new forums. We upgraded our forum sites to a more robust and modern system which we hope you will enjoy. Be sure to check out your profile by clicking the button on the top right and configure your preferences, signature, time zone, avatar, etc. as you wish. If you need help with using this new forum'ware try the help link on the bottom right.

    Click here to review your account now.

How to MS SQL Server Connection ?

haylazzz

New member
Joined
Oct 21, 2013
Messages
1
Programming Experience
3-5
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(connectionString)
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...
 

coolzero22

Member
Joined
Aug 6, 2013
Messages
8
Programming Experience
Beginner
Dim MAMULCMD As New SqlDataAdapter("select * from TBLSTSABIT", sqlConnection)
Dim
MAMUL as new Datatable
MAMULCMD .fill(MAMUL)

datagrid.DataSource=MAMUL
 
Top Bottom