Click here to Skip to main content
15,916,432 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to bind database with .net setup application using sql server and visual studio?
Posted

hai shekhar2012,

1.create a connection string as

Private con As New SqlConnection("Password=******;User ID=username;Data Source=databasename;Persist Security Info=True")

2.create a sql command


Private cmd As sqlCommand
     cmd = New sqlcommand(sqlQry, con)
            If con.State = ConnectionState.Closed Then
                con.Open()
            End If
 
Share this answer
 
Comments
shekhar2012 16-Feb-12 11:32am    
Actually the problem is i Can bind the database in my pc & can run it but while i create the setup file and deploy it in other system, the database connection doesn't work. What could be the soln.?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900