Discussion forum about all things SqlBase.
When using SqlBaseCommand ExecuteNonQuery() strange thing hapens.
Lets consider this sql
Code: Select all
INSERT INTO someTable (col1, col2) SELECT col1, col2 FROM someTable WHERE dateColumn BETWEEN 26.11.2015 AND 27.11.2015
After executing ExecuteNonQuery() I recieve error and the couse is that ExecuteNonQuery change CommandText into
Code: Select all
SELECT col1, col2 FROM someTable WHERE dateColumn BETWEEN 26.11 .2015 AND 27.11 .2015
notice space after 26.11 and 27.11
Same aply to ExecuteScalar() (of course different sql text but using BETWEEN and hard coded dates)
Am I missing something ?
Using parameters works ok, but I'm porting old application to SqlBase 12 and have things like this all over the place.
- Posts: 2176
- Joined: 09 Mar 2017, 05:32
- Location: Hyderabad, India
AFAIK Sqlbase does not accept dd-MM-yyyy format. Change it to yyyy-MM-dd and see?
8.5 accept and application was made with this version and is working with no problems.
I can change inline text to use SqlBaseParameter (which is working) but that's a lot of work.
Can you give me a small project example against the ISLAND database that I can give to Development?
Mike thanks for interest.
I took "sneak a peak" and FRBhote is right. .NET driver is now accepting only en-US format for inline dates (yyyy-MM-dd). I don't know in which version is this changed, but I'll have to live with it.
I've already changed all my format strings to parameters.
PS Inline text with format dd.MM.yyyy definitely worked in driver version 9.01.
Hmmmm. I'm going to get someone from Dev to comment on this one too.
That's a bug.
During the transition to fully managed code, the parsing code was revamped, and is now based on TD.NET.
By inspection, this might also affect TD.NET (and TD Mobile).
As a workaround, you can surround the date in single quotes, which will force it to be a literal and bypass the buggy parsing.
UPDATE: This has been fixed and will be available publicly in the next service pack.
Who is online
Users browsing this forum: [Ccbot] and 0 guests