i have some question about VB.NET or Visual Studio app. Alright let me start with app..i completely finished my work with build an app that will store, edit, import and others thing for my app using SQL Server Management Studio, My PC is the host for the server for that app...the app that i publish in my pc work fine and there were no error occur.. But when i copy the published file into others PC and install the app.. the error occur because its can't connect to my server.. how do i publish correctly so that i can install the app for other pc
Dim conn As New SqlConnection("Server=MYA02W00018;Database=PHMTest;Integrated Security = True")
This is the connection string
im sorry i should send this error firstly back then
Answer : my bad its because the other pc not join the domain after i join the domain the error occur that the login id from an untrusted domain and cannot be used with integrated authentication .. then i just change server authentication as SQL and windows authentication at SQL Server Management and after that just Integrated Security = True
i just need to remove it.. know i already got to login Thanks for helping guys
CodePudding user response:
Open installation location of your app. You will find a file that shares name with your app e.g. if your app name is biz_monitor, the file will be named biz_monitor.exe.config as shown in attached image
Open that file using text editor e.g notepad. Locate these lines:
connectionStrings>
<add name="Biz_monitor.My.MySettings.constring" connectionString="server=myserver_ip;user id=my_username;password=mypassword;database=mydatabase;procedure cache size=50;use performance monitor=True;use usage advisor=True;logging=True;connection reset=True"
providerName="MySql.Data.MySqlClient" />
</connectionStrings>
Edit: 1. server to ip address of the machine hosting sql server, 2. database to name of your database, 3.user id to your user name 4. Password to password of your sql server
Then ensure there is no firewall or antivirus blocking your connection. Test and give feedback
- ping the server using it's ip address. Assign static ip'S if you have not done so. if ping will work , network connection is established , if not fix network first. Then structure your connection string like this: Connstring = "Data Source=" & Server & ";Initial Catalog=" & DbName & ";User ID=" & User & ";Password=" & Pass & ""
configure your SQL server to use 'SQL Server Authentication'
CodePudding user response:
Now i already got the answer it just Integrated Security = True
i just need to remove it..know i already got to login Thanks for helping guys