Skip to main content
shopMaster connects to your local SQL Server database to track and sync product changes. You can authenticate using Windows Authentication or SQL Server password authentication.

Connection settings

Navigate to the Settings page in shopMaster to configure your database connection.
1

Enter server details

Provide your SQL Server connection information:
Server Name
string
required
The name or IP address of your SQL Server instance (e.g., localhost\SQLEXPRESS or 192.168.1.100)
Database Name
string
required
The name of the database containing your product table
Local Table Name
string
required
The name of your product table to sync (e.g., Products, Inventory)
2

Choose authentication method

Select your preferred authentication method from the Security dropdown:

Windows Authentication

Uses your Windows credentials to connect to SQL Server. This is the default and recommended method for local installations.
# Connection string format (from helper.py:12)
connection_string = f"mssql+pyodbc://:@{server_name}/{database_name}?driver=ODBC+Driver+17+for+SQL+Server&Trusted_Connection=yes"
Windows Authentication requires that your Windows user account has access to the SQL Server database.

Password Authentication

Uses SQL Server login credentials. When you select Password from the Security dropdown, additional fields appear:
Username
string
required
Your SQL Server login username
Password
string
required
Your SQL Server login password (displayed as asterisks)
# Connection string format (from helper.py:10)
connection_string = f"mssql+pyodbc://{username}:{password}@{server_name}/{database_name}?driver=ODBC+Driver+17+for+SQL+Server"
3

Test your connection

Click Test Connection to verify your database settings. shopMaster will:
  • Attempt to connect to your SQL Server database
  • Validate your Digible account credentials
  • Display a status message for both connections
# From main.py:184-195
local_db_url = createConnectionString(server_name, database_name, username, password, security)
local_test = test_connectionString(local_db_url)
online_test = digible_connect(digible_username, digible_password)["message"]
The test connection checks both your local database and Digible account to ensure end-to-end connectivity.
4

Complete configuration

Once the connection test succeeds, click Configure to:
  • Save your settings to a .env file
  • Create the ChangeLog table in your database
  • Set up database triggers for INSERT, UPDATE, and DELETE operations
The triggers automatically track changes to your product table without modifying your existing database schema.

Database requirements

Your SQL Server must have ODBC Driver 17 for SQL Server installed. shopMaster uses this driver to establish database connections.
Your product table must include these columns:
  • ProductID (VARCHAR(25)) - Primary key
  • ProductName (VARCHAR(75)) - Product name
  • SellPrice (NUMERIC(18, 2)) - Product price
  • QrCode (VARCHAR(100)) - Optional QR code
  • Status (INT) - Product status
The configuration process creates a ChangeLog table and three triggers (trgAfterInsert, trgAfterUpdate, trgAfterDelete) to track changes. See the change tracking guide for details.

Stored credentials

Your database credentials are saved to a .env file in the shopMaster installation directory:
local_db_url=mssql+pyodbc://...
server_name=localhost\SQLEXPRESS
db_name=MyDatabase
local_table=Products
security=Windows Authentication
# Only for Password authentication:
username=sa
password=mypassword
Keep your .env file secure. It contains sensitive connection information.

Troubleshooting

If the connection test fails:
  • Verify SQL Server is running and accessible
  • Check that the database and table names are correct
  • Ensure your user account has read/write permissions
  • Confirm ODBC Driver 17 is installed
  • For Windows Authentication, verify your Windows user has SQL Server access
  • For Password Authentication, check that SQL Server authentication is enabled
See the troubleshooting guide for more help.

Build docs developers (and LLMs) love