diff --git a/mssql_python/cursor.py b/mssql_python/cursor.py index 3acbffcc..7befbd4c 100644 --- a/mssql_python/cursor.py +++ b/mssql_python/cursor.py @@ -2499,7 +2499,7 @@ def nextset(self) -> Union[bool, None]: return True # ── Mapping from ODBC connection-string keywords (lowercase, as _parse returns) - def _bulkcopy( + def bulkcopy( self, table_name: str, data: Iterable[Union[Tuple, List]], @@ -2579,8 +2579,8 @@ def _bulkcopy( import mssql_py_core except ImportError as exc: raise ImportError( - "Bulk copy requires the mssql_py_core library which is not installed. " - "To install, run: pip install mssql_py_core " + "Bulk copy requires the mssql_py_core library which is not available. " + "This is an unexpected error. " ) from exc # Validate inputs diff --git a/tests/test_019_bulkcopy.py b/tests/test_019_bulkcopy.py index a50e5d6c..7d11e747 100644 --- a/tests/test_019_bulkcopy.py +++ b/tests/test_019_bulkcopy.py @@ -65,7 +65,7 @@ def test_bulkcopy_basic(cursor): # Perform bulkcopy with auto-mapping (no column_mappings specified) # Using explicit timeout parameter instead of kwargs - result = cursor._bulkcopy(table_name, data, timeout=60) + result = cursor.bulkcopy(table_name, data, timeout=60) # Verify result assert result is not None