Coder Social home page Coder Social logo

odbc's People

Contributors

coffeepots avatar teroz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

odbc's Issues

Not compilable on 0.18.1 674bd7bfad100a07e051e0a310bcf0a64c355a79

odbc\odbcparams.nim(163, 36) Error: type mismatch: got <int, SqlUSmallInt, SqlUSmallInt, SqlUSmallInt, SqlUSmallInt, SqlUSmallInt, SqlUSmallInt>
but expected one of:
proc initInterval(seconds, minutes, hours, days, months, years: int = 0): TimeInterval

expression: initInterval(ms, timestamp.Second, timestamp.Minute, timestamp.Hour, timestamp.Day,
timestamp.Month, timestamp.Year)

odbchandles.nim(44, 35) Error: type mismatch

Hi!
After upgrading to Nim Version 1.2.6, it does not compile anymore.

odbchandles.nim(44, 35) Error: type mismatch: got <SqlHEnv, TSqlInteger, TSqlInteger, int literal(0)>
but expected one of:
proc SQLSetEnvAttr(EnvironmentHandle: SqlHEnv; Attribute: TSqlInteger;
Value: SqlPointer; StringLength: TSqlInteger): TSqlSmallInt
first type mismatch at position: 3
required type for Value: SqlPointer
but expression 'odbcVersion' is of type: TSqlInteger
expression: SQLSetEnvAttr(envHandle, TSqlInteger(200), odbcVersion, 0)

The nil state for strings/seqs got removed from 0.19.0

The use of isNil is raising an error when compiling programs using winim. The temp solution is to use --nilseqs:on for a transition period as advised in the release notes of Nim 0.19.0. before this is adapted in winim.

--gc:arc and --gc:orc support

ARC and ORC allow RAII like handling of queries, allowing automatic freeing and cleanup after use. This enables easier 'throw away' queries.

Currently this support is pending a fix for a WideCString issue which results in string results including extraneous information when using the new GC.

Cannot open odbcsql when following readme example

Very likely I might have missed a step somewhere but when I attempted a basic connection using the example in the README. I got the following error:
odbc.nim(12, 3) Error: cannot open file: odbcsql

I'm on nim v2.0, windows x64

My hacky workaround:
I noticed (purely by chance) that the db_connector package comes with this odbcsql.nim file. I moved this missing file into the odbc source code dir and modified the import in the main odbc.nim to point to the new file structure. After this I was able to compile and connect like the example showed.

Is something missing from the readme or did the nim v2 change the bundled files or something? Because simply downloading this package and trying to connect like the readme shows does not work with nim v2.0

Support for variable size types including json

Currently, if I use the most recent version of the library with this query:

SELECT json_query(labels, '$') as labels FROM data_to_extract_labels WHERE [name] = ?name

I get a Error: unhandled exception: value out of range [RangeDefect] in the getColDetails proc.

If I change that to:

SELECT cast(json_query(labels, '$') as varchar(400)) as labels FROM data_to_extract_labels WHERE [name] = ?name

The query runs correctly.

Nanosecond not populated

Currently there is an issue where the Fraction part of SQL_TIMESTAMP_STRUCT is returning zero.
This is likely a precision issue when specifying the parameter's details.

`fieldData` renamed to `fromField`?

While reading through the README I came across (this)[https://github.com/coffeepots/odbc/blame/master/README.md#L148] line which seems to indicate that there is a procedure named fieldData, but trying to use it shows that it doesn't exist. After poking through the source I found the fromField procedure which seems to do the same thing. Not sure if it was renamed or something else happened, but it should be corrected in the README.

nvarchar(MAX) gets truncated

nvarchar(MAX) field gets truncated to 2 characters.

ODBC call SQLGetData returned non-success: success with info (1)
state = '01004' (err=0) message = '[Microsoft][SQL Server Native Client 11.0]String data, right truncation'

odbctypes.nim(107) toDataType Error: unhandled exception: Unsupported type when setting value: ctGUID [ODBCUnsupportedTypeException:ObjectType]

Hello,
I am getting the following exception when doing simple select * from table.

The table is

ColumnName DataType
uidMessageID uniqueidentifier
UserName sysname
PublishingServer sysname
OriginatorSID sysname
OriginatorPID nvarchar
dtTimeStamp datetime
dtExpiration datetime
nvcMessageType nvarchar
nNumParts int
uidBodyPartID uniqueidentifier
nvcBodyPartName nvarchar
nCounter int
imgContext image

This is MS SQL server 11.0.5388.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.