Results 1 to 2 of 2

Thread: ODBC broken in 1.9.16.17

  1. #1
    Junior Member
    Join Date
    Feb 2014
    Location
    Edmonton, Canada
    Posts
    6
    Rep Power
    11

    ODBC broken in 1.9.16.17

    Hi,

    The ODBC include file in ODBC352.inc. says something about the month variable conflict. or already declared. in version 1.9.16.17.

    Reloaded 1.9.15.0 works great.

    yes some of us still use it.

    Luc

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,818
    Rep Power
    10
    Hi Luc,

    thanks for reporting.
    Yes I got it and I will fix for next version. At work I still use it in some script.

    If in the meantime you want to fix it ... change \thinBasic\Inc\ODBC352.INC amending the first 75 line into:
     ' ########################################################################################
    ' ODBC352.INC - Constants, types and declares of the ODC API.
    ' ########################################################################################
    
    
    '#IF NOT %DEF(%ODBC352_INC)
        %ODBC352_INC = 1
    
    
       '#IF NOT %DEF(%WINAPI)
       '    #INCLUDE "WIN32API.INC"
       '#ENDIF
    
    
    '//-----------------------------------------------------------------------------
    '// File:      sqltypes.h
    '//
    '// Copyright:    Copyright (c) Microsoft Corporation
    '//
    '// Contents:     This file defines the types used in ODBC
    '//
    '//-----------------------------------------------------------------------------
    
    
    %ODBCVER = &H0352
    
    
    TYPE DATE_STRUCT
       _year  AS INTEGER
       _month AS WORD
       _day   AS WORD
    END TYPE
    
    
    TYPE TIME_STRUCT
       _hour   AS WORD
       _minute AS WORD
       _second AS WORD
    END TYPE
    
    
    Type TIMESTAMP_STRUCT
       _year     As Integer 
       _month    As Word 
       _day      As Word 
       _hour     As Word 
       _minute   As Word 
       _second   As Word 
       _fraction As DWord 
    End Type 
    
    
    '/*
    ' * enumerations for DATETIME_INTERVAL_SUBCODE values for interval data types
    ' * these values are from SQL-92
    ' */
    
    
    %SQL_IS_YEAR             = 1
    %SQL_IS_MONTH            = 2
    %SQL_IS_DAY              = 3
    %SQL_IS_HOUR             = 4
    %SQL_IS_MINUTE           = 5
    %SQL_IS_SECOND           = 6
    %SQL_IS_YEAR_TO_MONTH    = 7
    %SQL_IS_DAY_TO_HOUR      = 8
    %SQL_IS_DAY_TO_MINUTE    = 9
    %SQL_IS_DAY_TO_SECOND    = 10
    %SQL_IS_HOUR_TO_MINUTE   = 11
    %SQL_IS_HOUR_TO_SECOND   = 12
    %SQL_IS_MINUTE_TO_SECOND = 13
    
    
    TYPE SQL_YEAR_MONTH
       _year  AS DWORD
       _month AS DWORD
    END TYPE
    
    
    TYPE SQL_DAY_SECOND
       _day      AS DWORD
       _hour     AS DWORD
       _minute   AS DWORD
       _second   AS DWORD
       _fraction AS DWORD
    END TYPE
    
    The change add an underscore char in front of "year", "month", "day", "hour", "minute", "second" inside few TYPEs otherwise they are recognized as reserved words.
    I will fix in next version I'm working on allowing reserved words inside TYPEs to be used as TYPE element names.

    Thanks
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

Similar Threads

  1. how to create a simple ODBC database?
    By martin in forum ODBC
    Replies: 19
    Last Post: 13-08-2010, 14:24
  2. Alternative for ODBC Database
    By martin in forum thinBasic General
    Replies: 34
    Last Post: 29-08-2009, 08:17
  3. ODBC getting specific row
    By martin in forum ODBC
    Replies: 22
    Last Post: 21-08-2009, 11:48
  4. A little more help with ODBC
    By marcuslee in forum Fixed or cleared errors in help material
    Replies: 8
    Last Post: 04-09-2008, 19:32

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •