Click here to Skip to main content
14,242,971 members

C / C++ / MFC

 
GeneralRe: CStringList on heap Pin
Richard MacCutchan19-Jun-19 21:07
protectorRichard MacCutchan19-Jun-19 21:07 
GeneralRe: CStringList on heap Pin
Stefan_Lang19-Jun-19 23:20
memberStefan_Lang19-Jun-19 23:20 
GeneralRe: CStringList on heap Pin
jschell23-Jun-19 5:54
memberjschell23-Jun-19 5:54 
GeneralRe: CStringList on heap Pin
Stefan_Lang23-Jun-19 21:02
memberStefan_Lang23-Jun-19 21:02 
GeneralRe: CStringList on heap Pin
CPallini20-Jun-19 4:50
mveCPallini20-Jun-19 4:50 
AnswerRe: CStringList on heap Pin
Stefan_Lang20-Jun-19 21:43
memberStefan_Lang20-Jun-19 21:43 
GeneralRe: CStringList on heap Pin
_Flaviu20-Jun-19 23:43
member_Flaviu20-Jun-19 23:43 
QuestionRFX_Date throwing "Datetime field overflow" exception after changing to ODBC Driver 13 for SQL Server Pin
Member 1106593318-Jun-19 8:04
memberMember 1106593318-Jun-19 8:04 
Hi,

MFC app using CRecordset to transfer data to a SQL Server database.

Uses the RFX_Date mechanism mapping to SQL Server "datetime" data types, previously using the old "SQL Server" odbc driver and all was well. Trying to update to the more recent "ODBC Driver 13 for SQL Server" (TLS 1.2 support) and when attempting to write to the SQL Database I'm seeing the following exception :-
"Datetime field overflow. Fractional second precision exceeds the scale specified in the parameter binding."

Have found the following article which identifies the issue as related to the updated drivers (since SQL Server 2008) being unable to infer the precision of the parameter if not explictly detailed so throws the exception.

I tried changing the datatype on the Server to datetime2 with various precisions e.g. datetime2(0), datetime2(3) and datetime2(7), none of which worked.

I have subsequently read (here) that this issue cannot be resolved by server sides changes and is a breaking change for older clients :-<

It states there that
Quote:
I think the application change is just a matter of specifying a scale of 3.


I'm not sure what that means in terms of using the RFX_Date approach, will I have to write an RFX_Date2 replacement or is there one out here already?

If anyone has had a similar issue I'd appreciate hearing their suggestions on how to resolve this (preferably without having to do an update to the client app if possible).
QuestionRe: RFX_Date throwing "Datetime field overflow" exception after changing to ODBC Driver 13 for SQL Server Pin
Eddy Vluggen18-Jun-19 8:16
mveEddy Vluggen18-Jun-19 8:16 
QuestionRe: RFX_Date throwing "Datetime field overflow" exception after changing to ODBC Driver 13 for SQL Server Pin
David Crow18-Jun-19 9:04
memberDavid Crow18-Jun-19 9:04 
AnswerRe: RFX_Date throwing "Datetime field overflow" exception after changing to ODBC Driver 13 for SQL Server Pin
Richard MacCutchan18-Jun-19 9:39
protectorRichard MacCutchan18-Jun-19 9:39 
GeneralRe: RFX_Date throwing "Datetime field overflow" exception after changing to ODBC Driver 13 for SQL Server Pin
Member 1106593318-Jun-19 10:38
memberMember 1106593318-Jun-19 10:38 
GeneralRe: RFX_Date throwing "Datetime field overflow" exception after changing to ODBC Driver 13 for SQL Server Pin
Richard MacCutchan18-Jun-19 11:41
protectorRichard MacCutchan18-Jun-19 11:41 
QuestionManifest for DPI awareness. Pin
Maximilien17-Jun-19 9:25
memberMaximilien17-Jun-19 9:25 
AnswerRe: Manifest for DPI awareness. Pin
Richard MacCutchan17-Jun-19 20:50
protectorRichard MacCutchan17-Jun-19 20:50 
GeneralRe: Manifest for DPI awareness. Pin
Maximilien18-Jun-19 4:42
memberMaximilien18-Jun-19 4:42 
Questiongetchar / putchar - how does it really works ? Pin
Vaclav_15-Jun-19 6:49
memberVaclav_15-Jun-19 6:49 
AnswerRe: getchar / putchar - how does it really works ? Pin
Richard MacCutchan15-Jun-19 7:03
protectorRichard MacCutchan15-Jun-19 7:03 
GeneralRe: getchar / putchar - how does it really works ? Pin
Vaclav_15-Jun-19 8:34
memberVaclav_15-Jun-19 8:34 
GeneralRe: getchar / putchar - how does it really works ? Pin
k505415-Jun-19 9:07
memberk505415-Jun-19 9:07 
GeneralRe: getchar / putchar - how does it really works ? Pin
Richard MacCutchan16-Jun-19 3:02
protectorRichard MacCutchan16-Jun-19 3:02 
GeneralRe: getchar / putchar - how does it really works ? Pin
leon de boer16-Jun-19 5:43
memberleon de boer16-Jun-19 5:43 
GeneralRe: getchar / putchar - how does it really works ? Pin
Richard MacCutchan16-Jun-19 5:48
protectorRichard MacCutchan16-Jun-19 5:48 
GeneralRe: getchar / putchar - how does it really works ? Pin
Stefan_Lang16-Jun-19 21:29
memberStefan_Lang16-Jun-19 21:29 
GeneralRe: getchar / putchar - how does it really works ? Pin
Richard MacCutchan16-Jun-19 21:48
protectorRichard MacCutchan16-Jun-19 21:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.