Hi I created a C# winforms application, I added a connection with my database which I created in Sql Server 2008 Express in Management Studio. I published the project and everything seems to be working fine in my computer, but when i ran the setup in another computer, the program had stopped working and showed this message error. I want the application to run in any computer.
Problem signature: Problem Event Name: CLR20r3 Problem Signature 01: geography.exe Problem Signature 02: 1.0.0.0 Problem Signature 03: 525520ed Problem Signature 04: System.Data Problem Signature 05: 4.0.30319.17929 Problem Signature 06: 4ffa5c76 Problem Signature 07: 2592 Problem Signature 08: 27 Problem Signature 09: System.Data.SqlClient.Sql OS Version: 6.1.7600.2.0.0.256.1 Locale ID: 1032 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
My connection string is Data Source=.\sqlexpress;Initial Catalog=geografia;Integrated Security=True
I changed it to Data Source=(local)\sqlexpress;Initial Catalog=geografia;Integrated Security=True but still the same result.
Then i tried to catch the error with a try catch block in the first database connection and when i ran the program it showed me cannot open database "geografia" requested by the login. The login failed. Login failed for user 'pcname-PC\username'.
When I was publishing the application I included geography.pdb as data file (geography is the name of my project and I don't know if thatis for embedding the database)
I am new to programming and I don't know if I attached my database in the application.
I read some stuff but i am a bit confused. Is there any idea?
hostnameof your instead oflocalhost,hostname\sqlexpress- Ofiris