coffeepots / odbc Goto Github PK
View Code? Open in Web Editor NEWLibrary wrapper to ODBC
License: MIT License
Library wrapper to ODBC
License: MIT License
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)
odbc does not compile as the {.unchecked.} pragma got removed
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 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.
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.
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
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.
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.
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) 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'
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
#v0.19: {200: "a lot", 1: "one", 2: "two", 3: "three", 20: "a lot"}
#v0.20: Error: unhandled exception: the length of the table changed while iterating over it [AssertionError]
Line 56 in 9af9e73
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.