Overview
shopMaster connects to your local SQL Server database to track and synchronize product changes. You can use either Windows Authentication or SQL Server Authentication (username/password) to establish the connection.Connection methods
shopMaster supports two authentication methods for SQL Server:Windows Authentication (Recommended)
Windows Authentication (Recommended)
Windows Authentication uses your Windows credentials to connect to SQL Server. This is the most secure option and doesn’t require you to manage separate database passwords.When to use:
- You’re running SQL Server on the same machine as shopMaster
- Your Windows account has access to the SQL Server instance
- You want seamless, secure authentication
SQL Server Authentication (Password)
SQL Server Authentication (Password)
SQL Server Authentication uses a database username and password. Use this method when connecting to remote servers or when Windows Authentication isn’t available.When to use:
- You’re connecting to a remote SQL Server instance
- Windows Authentication is not configured
- You need to use a specific SQL Server login account
Required information
Before configuring your connection, gather the following information:Server name
The name or IP address of your SQL Server instance.Examples:
localhostor.for local instancesDESKTOP-ABC123\SQLEXPRESSfor named instances192.168.1.100for remote serversserver.domain.com\INSTANCEfor domain servers
Database name
The exact name of the database containing your product table.Example:
ProductsDB or InventorySystemTable name
The name of the table that contains your product data. This table must have columns for:
ProductID(VARCHAR(25))ProductName(VARCHAR(75))SellPrice(NUMERIC(18, 2))QrCode(VARCHAR(100))Status(INT)
Products or dbo.InventoryHow connection strings work
shopMaster builds connection strings using SQLAlchemy and the ODBC Driver 17 for SQL Server. Understanding the format helps you troubleshoot connection issues.Windows Authentication format
The empty
:@ before the server name indicates no username or password is needed. The Trusted_Connection=yes parameter tells SQL Server to use Windows credentials.SQL Server Authentication format
Special characters in passwords must be URL-encoded. For example,
@ becomes %40, # becomes %23.Testing your connection
shopMaster includes a built-in connection test feature.Enter connection details
Fill in your server name, database name, table name, and authentication credentials.
Click 'Test Connection'
The application will attempt to connect and execute a simple query:This verifies that:
- The server is reachable
- Your credentials are valid
- The database exists and is accessible
Review the result
You’ll see one of these messages:
- “Connection Successful” - You’re ready to configure
- Error message - See Common connection errors for solutions
Connection test implementation
The test executes this code (fromapp/helper.py:15):
Initial configuration
After testing your connection, you need to configure shopMaster to enable change tracking.Click 'Configure'
This performs several critical setup tasks:
- Creates the ChangeLog table - Stores insert, update, and delete operations
- Creates three triggers on your product table:
trgAfterInsert- Logs new productstrgAfterUpdate- Logs product changestrgAfterDelete- Logs deleted products
- Saves configuration to your
.envfile - Stores your Digible access token
What happens during configuration
The configuration process creates this table structure:ODBC Driver requirements
shopMaster requires ODBC Driver 17 for SQL Server. If you encounter driver-related errors, you need to install it.Download and install
- Download from Microsoft’s official site
- Run the installer
- Restart shopMaster after installation
Verify installation
You can check which ODBC drivers are installed: Windows:- Open ODBC Data Sources (search in Start menu)
- Go to the Drivers tab
- Look for “ODBC Driver 17 for SQL Server”
Security best practices
Use Windows Authentication when possible
Use Windows Authentication when possible
Windows Authentication is more secure because:
- No passwords stored in the
.envfile - Leverages existing Windows security
- Supports multi-factor authentication if configured
- Easier to manage with Active Directory
Use least privilege for SQL accounts
Use least privilege for SQL accounts
Create a dedicated SQL Server account for shopMaster with only the permissions it needs:
Protect your .env file
Protect your .env file
The
.env file stores sensitive information:- Database connection strings
- SQL Server passwords (if using SQL Auth)
- Digible API access tokens
- Never commit
.envto version control - Restrict file permissions (Windows: only your user account)
- Store backups securely
- Rotate passwords regularly
Use encrypted connections for remote databases
Use encrypted connections for remote databases
If connecting to a remote SQL Server, enable encryption:
- Configure SSL/TLS on SQL Server
- Modify connection string to include:
Connection string examples
Local SQL Server Express (Windows Auth)
Local SQL Server (SQL Auth)
Remote SQL Server with instance name
Remote SQL Server with port number
Next steps
Start syncing
Begin synchronizing your product data with Digible
Troubleshooting
Solve common connection and sync issues
Best practices
Optimize your shopMaster deployment
API Reference
Explore connection functions