Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
|
microsoft_sql_server [2025/12/10 09:56] jango [Downloads] |
microsoft_sql_server [2025/12/10 10:31] (aktuell) jango [Code] |
||
|---|---|---|---|
| Zeile 123: | Zeile 123: | ||
| std::string conn = | std::string conn = | ||
| //" | //" | ||
| - | " | + | " |
| //" | //" | ||
| - | " | + | " |
| " | " | ||
| - | "Uid=semacore_admin;" | + | "Uid=admin;" |
| " | " | ||
| //" | //" | ||
| Zeile 146: | Zeile 146: | ||
| check(SQLExecDirectA(stmt, | check(SQLExecDirectA(stmt, | ||
| - | // 4) Results lesen (1. Spalte als Text) | + | // 4) Results lesen (1. und 3. Spalte als Text) |
| + | char id[256]; | ||
| + | SQLLEN idInd = 0; | ||
| char name[256]; | char name[256]; | ||
| SQLLEN nameInd = 0; | SQLLEN nameInd = 0; | ||
| - | check(SQLBindCol(stmt, | + | check(SQLBindCol(stmt, |
| - | stmt, SQL_HANDLE_STMT, | + | |
| while (SQLFetch(stmt) == SQL_SUCCESS) { | while (SQLFetch(stmt) == SQL_SUCCESS) { | ||
| - | std::cout << name << " | + | std:: |
| } | } | ||