Re: Help Get info from MSSQL
any idea
i read about .SQLClient but there connect with windows autdition
Re: Help Get info from MSSQL
Try reading through out Database FAQ & Tutorial section It's got some good stuff in there including how to connect and retrieve data. Also, for help on the connectionstring, see http://www.connectionstrings.com
-tg
Re: Help Get info from MSSQL
i manage to make it something but i want to make it custom to read the information from the textboxes and to connect to it:
here is my code, but not working
Code:
Imports System.Data.SqlClient
Public Class Form1
Private csx As New SqlConnection("Data Source=textbox1.text;Initial Catalog=textbox4.text;Integrated Security=True")
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub SqlConnection1_InfoMessage(ByVal sender As System.Object, ByVal e As System.Data.SqlClient.SqlInfoMessageEventArgs) Handles SqlConnection1.InfoMessage
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
csx.Open()
MsgBox("Work")
csx.Close()
End Sub
End Class
I got 4 textboxes
1 - server address:
2 - username:
3- password:
4 - Database:
When press the button to read the stuff and connect to it