-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Shashank Patil edited this page Jul 26, 2026
·
1 revision
This guide covers common issues you may encounter while using the Generic SQL API Framework and provides recommended solutions.
- Unable to connect to SQL Server
- Connection timeout
- Login failed
- SQL Server is not running
- Incorrect server name
- Invalid credentials
- ODBC Driver is missing
- Firewall blocking the connection
- Verify SQL Server is running.
- Confirm the server and instance name.
- Check your database credentials.
- Install the Microsoft ODBC Driver for SQL Server.
- Test the connection using SQL Server Management Studio (SSMS).
{
"success": false,
"message": "Query file not found."
}- Verify the SQL file exists.
- Check the file name matches the JSON request.
- Ensure the file is located in the
queries/directory.
Example:
queries/
customers.sql
Request:
{
"query": "customers"
}{
"success": false,
"message": "Invalid JSON format."
}- Validate the JSON syntax.
- Ensure all braces and commas are correct.
- Use double quotes for keys and string values.
{
"success": false,
"message": "Missing required parameter: CustomerID"
}Provide all required parameters.
Example:
{
"query": "customer_by_id",
"parameters": {
"CustomerID": 101
}
}The query fails during execution.
- Run the SQL directly in SSMS.
- Check for syntax errors.
- Verify table and column names.
{
"success": true,
"data": []
}- No matching records
- Incorrect filter values
- Query conditions are too restrictive
- Verify the data exists.
- Review filter parameters.
- Test the SQL directly in SQL Server.
Database connection fails immediately.
Install a supported Microsoft ODBC Driver.
Recommended versions:
- ODBC Driver 18 for SQL Server
- ODBC Driver 17 for SQL Server
Requests take longer than expected.
- Add indexes to frequently searched columns.
- Avoid
SELECT *. - Use pagination for large datasets.
- Review the SQL execution plan.
- Optimize JOIN operations.
The requested endpoint cannot be found.
- Verify the API URL.
- Ensure the web server is configured correctly.
- Confirm the project is deployed in the expected directory.
Internal Server Error.
- Check the application logs.
- Verify the database connection.
- Review the PHP error log.
- Confirm the SQL query is valid.
The framework cannot access SQL files or configuration files.
- Verify file permissions.
- Ensure the web server has read access.
- Confirm the project directory is accessible.
Before reporting an issue, verify:
- SQL Server is running.
- Database configuration is correct.
- ODBC Driver is installed.
- SQL files exist.
- JSON request is valid.
- Parameters are supplied.
- SQL executes successfully in SSMS.
- Application logs do not contain critical errors.
If the issue persists:
- Search existing GitHub Issues.
- Review the project documentation.
- Open a new GitHub Issue with:
- Framework version
- Operating system
- PHP version
- SQL Server version
- Error message
- Steps to reproduce the issue
Providing complete information helps maintainers reproduce and resolve issues more quickly.