A common error when trying to start ShipWeight after an installation is often followed by messages like:

“Error in function Could not open database Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=SWLogin;Data Source=PHLWS0019;User Id=SA;Password=;”

or

“Could not establish connection to SQL Server database;SWLogin”

or similar messages when trying to start ShipWeight.

If this document does not help you, please do not hesitate to contact BAS engineering at support@shipweight.com

 

 

To resolve the problem

MS SQL Server or MS SQL Server Express needs to be installed and the ShipWeight server setup must be run to install the databases upon this.   This is a prerequisite action to further follow the instructions below.


First, make sure that the needed SQL driver is installed properly.  This should be installed by default by the ShipWeight installation, but in case this has been uninstalled or not initialized properly, please run the file msoledbsql_18_2.1.0_x64.msi found in the ShipWeight folder of the client machine.


If the driver is installed properly and access is still not working, please try the follow the procedure on the next page to obtain more information on the problem.  Then based on the results from these, check suggested actions at the end of this document.


 

Checking SQL Server connection from Client Machine

This document describes a way of testing SQL Server connection from a client machine.  The test can be helpful if ShipWeight is installed but not working.  The test will determine if the problem lies in ShipWeight installation itself or in the network setup and permission setting.

Follow these steps:

  1. Create a new text-file by right-clicking on the client Desktop and select “New->Text Document” from the submenu.
  2. Rename this file from to “Test.udl”.  The icon should change from notepad icon to udl icon as shown here: 

  1. Right-click on Test.udl and select “Properties”.  In the properties dialog, select the tab “Provider”.   In the Provider tab, select “Microsoft OLD DB Provider for SQL Server” as shown:
  2. Next, click on the “Connection” tab and follow these steps:
    1. Enter the name of the SQL Server
    2. Select “Use Windows NT Integrated security”
    3. Select the database SWLogin
    4. Click “Test Connection”

If the result of going through this procedure gives you a message box stating “Test connection succeeded.” then the problem of ShipWeight lies within the ShipWeight client installation.

If you do not get this message box at the end of the procedure then the problem is not directly connected to the client installation of ShipWeight but most likely due to the permission settings on the network and SQL Server or in may be due to a missing ShipWeight server installation.

 


 

Based on the results from the procedure above, please check:

If you can make the test connection described here, please check that the registry setting for string “ServerName” in HKEY_LOCAL_MACHINE\SOFTWARE\BAS engineering\ShipWeight\7.0\Database in windows registry on client machine is set to the correct SQL instance name (it is not supposed to be the server name, but the SQL Server instance name).  If you do not know the name of the instance, try to log on SQL Management Studio and see the name that pops up when you try to connect.

If you cannot make the test connection, please make sure that you have the proper instance name in the test connection.  If you run SQL Express or MSDE, double check that you have enabled the client protocols (see installation guidance).  Also make sure that the windows users have set up permissions to the SQL server.  ShipWeight uses windows authentication, so users must be set up with proper rights.