-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
When running SELECT @@VERSION against SQL Server via an ODBC DSN, the returned NVARCHAR contains corrupt/garbage characters in Dart. The root cause appears to be that the binding does not perform incremental reads (SQLGetData in a loop) when the driver returns data in multiple parts.
Reproduction (minimal Dart):
import 'dart:io';
import 'package:dart_odbc/dart_odbc.dart';
Future<void> main() async {
final dsn = Platform.environment['DSN'] ?? 'DSN';
final user = Platform.environment['USERNAME'] ?? 'USERNAME';
final pass = Platform.environment['PASSWORD'] ?? 'PASSWORD';
final odbc = DartOdbc(dsn: dsn);
await odbc.connect(username: user, password: pass);
final rows = await odbc.execute('SELECT @@VERSION AS version');
print(rows.isNotEmpty ? rows[0]['version'] : '<no rows>');
await odbc.disconnect();
}Expected: a clean, human-readable SQL Server version string (no binary/garbage bytes).
Observed: the printed string contains embedded garbage/non-printable bytes.
Metadata
Metadata
Assignees
Labels
No labels