Easy way to create database connection string vb.net & Microsoft sql server.
Open New Project.
Data ----> Add New Data
Click Create New Connection Button.
See this images.
Open Add Connection Window.
Select SQL Server Name.
If u installed sql server authentication mode , select sql authentication & you must enter sql user name & password. Other wise select windows authentication mode.
Add Select Database name in drop down list.
See images..
Then Click Test Connection Button. if connection is ok display message " Test Connection Successfully "
Other wise popup Error Message.
After Test connection click Advanced Button.
Then Display Advanced Properties Window.
Copy text i mention in highlighted red colour and paste your coding.
Like this ::
Public Overridable Function Con_Open() As Integer
Try
Con_Adon = New SqlConnection(Data Source=**** ;Initial Catalog=*** ;User ID=** ;Password=*** )
Con_Adon.Open()
Return 1
Catch ex As Exception
Return 0
End Try
End Function
Do you have any problem or doubt please comment . i will help you.
Thank you.
nice Creativity
This comment has been removed by the author.
This method is very easy to create connection between .net and sql. Thank you for Creating.
Thank you nice job. plz keep Update.