1
votes

I am trying to execute my C# Program in another computer. every thing is ok except trying to print something. the error number 40 in SQL is shown. it's strange because all of my program work fine but printing is not ok. My connection string is: SqlConnection con = new SqlConnection("Data Source=(local);initial catalog=KianVandaIntegratedSoftware;integrated security=true;");

1
I think i should replace (local) with another phrase. but I don't know what phrase - ali samiey
(dot) or (local) can be used if you run on 1 computer. If you run using 2 computers you need to replace (local) with the name of computer where your database resides, i.e. first computer name. - yW0K5o

1 Answers

0
votes

(dot) or (local) can be used if you run on 1 computer. If you run using 2 computers you need to replace (local) with the name of computer where your database resides, i.e. first computer name.