Database Issue

  • Thread starter Thread starter Donald Uko
  • Start date Start date
D

Donald Uko

Guest
I recently hosted a website but the local database is not connecting. but when running my website on via visual studio on a local machine, everything works fine; the database connects and I am able to insert data into the database. since I hosted the site, the database does not connect. Here is my connection string:

con.ConnectionString = "Data Source (LocalDB)\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\Dataregister.mdf;Integrated Security=True";

and this too: SqlConnection con = new SqlConnection("Data Source (LocalDB)\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\Dataregister.mdf;Integrated Security=True"); I actually used these connection strings on different web pages.

What will I do?

-Donald Uko

Continue reading...
 

Similar threads

D
Replies
0
Views
769
DexterCamarillo
D
D
Replies
0
Views
714
DexterCamarillo
D
D
Replies
0
Views
306
DexterCamarillo
D
M
Replies
0
Views
168
Markus Freitag
M
Back
Top