Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DMD shipps outdated 32-bit ODBC import library #19014

Open
dlangBugzillaToGithub opened this issue Jul 8, 2015 · 0 comments
Open

DMD shipps outdated 32-bit ODBC import library #19014

dlangBugzillaToGithub opened this issue Jul 8, 2015 · 0 comments
Labels
Arch:x86 Issues specific to x86 Druntime Specific to druntime OS:Windows P3 Severity:normal

Comments

@dlangBugzillaToGithub
Copy link

Dmitry Olshansky (@DmitryOlshansky) reported this on 2015-07-08T11:56:10Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=14787

Description

This ODBC test program listed below fails to link due to:
```
 Error 42: Symbol Undefined _SQLSetEnvAttr@16
odbc.obj(odbc) 
 Error 42: Symbol Undefined _SQLAllocHandle@12
--- errorlevel 2

```
x64 version works just fine by using MS SDK libraries.

pragma(lib, "odbc32");
import etc.c.odbc.sql;
import etc.c.odbc.sqlext;
import std.stdio;

int main() {
  SQLHENV env;
  SQLCHAR driver[256];
  SQLCHAR attr[256];
  SQLSMALLINT driver_ret;
  SQLSMALLINT attr_ret;
  SQLUSMALLINT direction;
  SQLRETURN ret;

  SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &env);
  SQLSetEnvAttr(env, SQL_ATTR_ODBC_VERSION, cast(void *) SQL_OV_ODBC3, 0);

  direction = SQL_FETCH_FIRST;
  while(SQL_SUCCEEDED(ret = SQLDrivers(env, direction,
                       driver.ptr, driver.sizeof, &driver_ret,
                       attr.ptr, attr.sizeof, &attr_ret))) {
    direction = SQL_FETCH_NEXT;
    printf("%s - %s
", driver.ptr, attr.ptr);
    if (ret == SQL_SUCCESS_WITH_INFO) printf("\tdata truncation
");
  }

  return 0;
}
@thewilsonator thewilsonator added the Druntime Specific to druntime label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch:x86 Issues specific to x86 Druntime Specific to druntime OS:Windows P3 Severity:normal
Projects
None yet
Development

No branches or pull requests

2 participants