Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #10636

Re: ODBC numerics

From James Martin <james@northwoodlumber.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: ODBC numerics
Date 2017-06-01 17:50 -0400
Organization A noiseless patient Spider
Message-ID <ogq1vn$55e$1@dont-email.me> (permalink)
References (4 earlier) <nv7lto$egb$1@dont-email.me> <nv89d0$iak$1@news.albasani.net> <ocl8ru$ld$1@dont-email.me> <oclslq$gmv$1@news.albasani.net> <ocm37l$20s$1@dont-email.me>

Show all headers | View raw


I am now working on this again as I have time. I have noticed that in 
the following statement in SQLSelect:GetData (copied from the SDK)

nODBCType := aSQLColumns[nIndex]:ODBCType

it returns 30 which is not a handled number in the following DO CASE 
statements.

In reality the values are numbers, floats.

To debug I opened a file and am writing cODBCType plus the value 
Getdata() returns. I added a CASE statement for type 30 and have proof 
that it is being selected. However AsString(pTemp) does not return 
anything.

Does anyone have anything suggestions? Is there a way I can look at 
pTemp more low level?

James

On 2017-04-12 04:41 PM, James Martin wrote:
> OK. I'll try that.
> 
> James
> 
> On 2017-04-12 02:46 PM, Jamal wrote:
>> Copy the FIELDGET method into your program and instead inherit from your
>> custom dbServer class for example MyDBServer that inherits from dbServer.
>>
>> For example:
>>
>> CLASS MyDBServer INHERIT dbServer
>> code your init method accordingly...
>>
>> METHOD FIELDGET(uField) CLASS MyDBServer
>>
>> Then you can debug it.
>>
>> HTH,
>> Jamal
>>
>> "James Martin"  wrote in message news:ocl8ru$ld$1@dont-email.me...
>>
>> How do I enable debug in the SQL SDK Library? The debug lines say "IFDEF
>> __DEBUG__". However the program does not allow to to define "__DEBUG__"
>>
>> James
>>
>> On 2016-10-31 04:26 PM, Jamal wrote:
>>> Take a look at the SQL SDK class in VO, specifically the FIELDGET 
>>> method.
>>>
>>> If the field (column) is NIL, the function may return 0.
>>> You will have to debug it the above the method and see what is being
>>> returned.
>>>
>>> Most likely the issue is with the codebase DBF not VO. Doesn't that
>>> vendor have tools to test and display their DBF files.
>>>
>>>
>>> Jamal
>>>
>>> "James Martin"  wrote in message news:nv7lto$egb$1@dont-email.me...
>>>
>>> The database is DBFs by a company called Codebase. If a index is present
>>> then a regular DBF program cannot open them since they are a modified
>>> DBF. Data Architect from Advantage does open them (took a copy and
>>> deleted the index) The numerics that it says is Numeric,17,7
>>>
>>> Actually to my surprise, Data Architect does open one of the DBFs. It
>>> shows it to be the VFP driver. I just now tried the CDX driver. Its does
>>> not work. It there a VFP driver?
>>>
>>> James
>>>
>>> On 16-10-31 10:02 AM, Johan Nel wrote:
>>>> Martin,
>>>>
>>>> What is the type of the numerical columns in the database?
>>>>
>>>> Remember something about single float, double float issues I had long
>>>> time ago with the VO ODBC classes.
>>>>
>>>> Johan
>>>>
>>>> On 2016/10/31 15:24, James Martin wrote:
>>>>> I created a SQLServer with the VO editor. Then I used it in the
>>>>> bBrowser window this way. The SQLServer uses
>>>>> Type:Numeric,Length:15,Decimals:6 - all by default.
>>>>>
>>>>> LOCAL oBr                 AS bBrowser
>>>>>     LOCAL oDB                 AS ARDETINV
>>>>> *    LOCAL oCol                 AS bDataColumn
>>>>> *    LOCAL oColour             AS bColorCondition
>>>>>
>>>>>     oDB    := ARDETINV{}
>>>>>
>>>>>     IF oDB:Used
>>>>>
>>>>>         oBr := SELF:oDCDataBrowser
>>>>>         oBr:Editable         := FALSE
>>>>>         oBr:CurrentMode     := #Line
>>>>>         oBr:ViewLogicAs := #CheckBox
>>>>>
>>>>>         oBr:Use(oDB)
>>>>>
>>>>>     ENDIF
>>>>>
>>>>> James
>>>>>
>>>>> On 16-10-28 12:41 PM, dlzc wrote:
>>>>>> Dear James Martin
>>>>>>
>>>>>> On Friday, October 28, 2016 at 6:54:28 AM UTC-7, James Martin wrote:
>>>>>>> I would like some help.
>>>>>>>
>>>>>>> In the pass I tried to use PostgresSQL via ADO using
>>>>>>> VO2ADO and via ODBC using the VO SQL classes. Both
>>>>>>> times I was able to browse the databases and the
>>>>>>> character fields showed fine. However the numeric
>>>>>>> fields were zero. I thought there was something wrong
>>>>>>> with the drivers for PostgreSQL.
>>>>>>>
>>>>>>> However I am attempting to view another database via
>>>>>>> ODBC and I have exactly the same problem. Is there
>>>>>>> anyone who can give some direction as to what could
>>>>>>> be the problem. The numerics all show zero.
>>>>>>
>>>>>> Can you show us your browse code, and the structure of your database?
>>>>>>
>>>>>> David A. Smith
>>>>>>
>>>>
>>>> -- 
>>>> *Johan Nel*
>>>> /Grafx Support Team (Vulcan.NET)/
>>>> George, South Africa
>>>>
>>>
>>

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: ODBC numerics James Martin <james@northwoodlumber.com> - 2017-04-12 09:11 -0400
  Re: ODBC numerics "Jamal" <noooospam@example.com> - 2017-04-12 14:46 -0400
    Re: ODBC numerics James Martin <james@northwoodlumber.com> - 2017-04-12 16:41 -0400
      Re: ODBC numerics James Martin <james@northwoodlumber.com> - 2017-06-01 17:50 -0400
        Re: ODBC numerics "Jamal" <noooospam@example.com> - 2017-06-03 10:58 -0400
          Re: ODBC numerics James Martin <james@northwoodlumber.com> - 2017-06-05 17:07 -0400
          Re: ODBC numerics James Martin <james@northwoodlumber.com> - 2017-06-05 17:13 -0400
          Re: ODBC numerics James Martin <james@northwoodlumber.com> - 2017-06-06 17:12 -0400
            Re: ODBC numerics James Martin <james@northwoodlumber.com> - 2017-06-06 17:19 -0400
              Re: ODBC numerics James Martin <james@northwoodlumber.com> - 2017-06-08 10:02 -0400
          Re: ODBC numerics James Martin <james@northwoodlumber.com> - 2017-06-08 08:13 -0400
  Re: ODBC numerics "Karl-Heinz" <invalid@invalid.invalid> - 2017-04-13 08:08 +0200

csiph-web