Click here to Skip to main content
15,672,088 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I am newbie to .I am trying to run a program with sql database using visual studio and finding it very difficult to run the script and changing the connection string.Can anyone help!

Here is link from which i downloaded[^]
[no name] 30-Aug-13 9:16am    
"Can anyone help", no. No one can help. You did not ask a question or describe any kind of a problem.
Member 9961335 30-Aug-13 9:26am    
problem is that i cannot connect to updated database..
The source provided me an sql script which i ran using sql server management studio which created a database.
now all i need is to connect the update database to the project..
[no name] 30-Aug-13 9:50am    
Okay so why are you unable to connect to the database? Open up the project, and change the connection string.
Dave963 30-Aug-13 9:17am    
Post code snippets...
Member 9961335 30-Aug-13 9:28am    
Can't get you..i am very new to programming..

Usually in the web.config file you will find a section of code like this...

    <add name="ConnString" connectionString="data source = david-pc; initial catalog=database; user=typeyourusername; password=typeyourpassword;"/>

setp 1)
where it says data source = david-pc
replace david-pc with the server name displayed on your login screen when you log into sql server management studio

step 2)
replace typeyourusername with the login value when you login to sql server management studio

step 3)
replace typeyourpassword with the password value when you login to sql server management studio

step 4)
replace database with the name of the database you created through the script you ran
Share this answer
Member 9961335 31-Aug-13 1:07am    
Finally :D made it work mate! I should reinstall sql server and create a new server instance.Thanks Mate :D
Just replace yourusername and yourpassword

    <add name="InnovationManagement_ConnString" connectionstring="Data Source=(localdb)\test;Initial Catalog=CSPproject-v2;User ID=yourusername;Password=yourpassword" providername="System.Data.SqlClient" />
Share this answer
Member 9961335 30-Aug-13 9:56am    
DB.Innovation_Management_UserDataTable UTbl = UTA.GetDataByLogin(TextBox_email.Text, TextBox_password.Text); i get an error in this line

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