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


Groups > comp.lang.clipper.visual-objects > #9874 > unrolled thread

ODBC numerics

Started byJames Martin <james@northwoodlumber.com>
First post2016-10-28 09:56 -0400
Last post2016-11-02 09:48 +0100
Articles 20 on this page of 22 — 6 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  ODBC numerics James Martin <james@northwoodlumber.com> - 2016-10-28 09:56 -0400
    Re: ODBC numerics dlzc <dlzc1@cox.net> - 2016-10-28 09:41 -0700
      Re: ODBC numerics James Martin <james@northwoodlumber.com> - 2016-10-31 09:24 -0400
        Re: ODBC numerics James Martin <james@northwoodlumber.com> - 2016-10-31 10:54 -0400
          Re: ODBC numerics "Jamal" <noooospam@example.com> - 2016-10-31 16:26 -0400
            Re: ODBC numerics James Martin <james@northwoodlumber.com> - 2017-04-11 17:16 -0400
            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
    Re: ODBC numerics Pilks <richardp@lukhozi.co.za> - 2016-11-01 08:03 -0700
      Re: ODBC numerics James Martin <james@northwoodlumber.com> - 2016-11-01 17:24 -0400
        Re: ODBC numerics "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-11-02 08:00 +0100
          Re: ODBC numerics "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-11-02 09:48 +0100

Page 1 of 2  [1] 2  Next page →


#9874 — ODBC numerics

FromJames Martin <james@northwoodlumber.com>
Date2016-10-28 09:56 -0400
SubjectODBC numerics
Message-ID<nuvl9r$jd4$1@dont-email.me>
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.

James

[toc] | [next] | [standalone]


#9875

Fromdlzc <dlzc1@cox.net>
Date2016-10-28 09:41 -0700
Message-ID<ae070fd2-3181-45cd-9a66-c64d8e01fb13@googlegroups.com>
In reply to#9874
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

[toc] | [prev] | [next] | [standalone]


#9877

FromJames Martin <james@northwoodlumber.com>
Date2016-10-31 09:24 -0400
Message-ID<nv7gls$rpr$1@dont-email.me>
In reply to#9875
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
>

[toc] | [prev] | [next] | [standalone]


#9878

FromJames Martin <james@northwoodlumber.com>
Date2016-10-31 10:54 -0400
Message-ID<nv7lto$egb$1@dont-email.me>
In reply to#9877
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
>

[toc] | [prev] | [next] | [standalone]


#9879

From"Jamal" <noooospam@example.com>
Date2016-10-31 16:26 -0400
Message-ID<nv89d0$iak$1@news.albasani.net>
In reply to#9878
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
> 

[toc] | [prev] | [next] | [standalone]


#10415

FromJames Martin <james@northwoodlumber.com>
Date2017-04-11 17:16 -0400
Message-ID<ocjgve$e5e$1@dont-email.me>
In reply to#9879
Back to this problem again.

The company sent a program called wdbmaint that works well. I'm not sure 
it goes through ODBC or directly. It works well.

I looked at the SDK fieldget and would appreciate a bit of help in 
debugging. I created a new application that uses the SDK libraries. Any 
pointers on how to start with this?

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
>>
>

[toc] | [prev] | [next] | [standalone]


#10416

FromJames Martin <james@northwoodlumber.com>
Date2017-04-12 09:11 -0400
Message-ID<ocl8ru$ld$1@dont-email.me>
In reply to#9879
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
>>
>

[toc] | [prev] | [next] | [standalone]


#10419

From"Jamal" <noooospam@example.com>
Date2017-04-12 14:46 -0400
Message-ID<oclslq$gmv$1@news.albasani.net>
In reply to#10416
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
>>
> 

[toc] | [prev] | [next] | [standalone]


#10421

FromJames Martin <james@northwoodlumber.com>
Date2017-04-12 16:41 -0400
Message-ID<ocm37l$20s$1@dont-email.me>
In reply to#10419
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
>>>
>>
>

[toc] | [prev] | [next] | [standalone]


#10636

FromJames Martin <james@northwoodlumber.com>
Date2017-06-01 17:50 -0400
Message-ID<ogq1vn$55e$1@dont-email.me>
In reply to#10421
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
>>>>
>>>
>>

[toc] | [prev] | [next] | [standalone]


#10642

From"Jamal" <noooospam@example.com>
Date2017-06-03 10:58 -0400
Message-ID<oguir7$tnd$1@news.albasani.net>
In reply to#10636
You need to write:

dVal  := REAL8( pTemp )      // pTemp is a PTR

? AsString(dVal)

Also, you may have to dig deeper in the SDK especially __GetLongData()

Sorry, I cannot be more of help since I don’t deal with SQL from VO. It's 
all C# and ASP.NET stuff.

Jamal

"James Martin"  wrote in message news:ogq1vn$55e$1@dont-email.me...

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
>>>>
>>>
>> 

[toc] | [prev] | [next] | [standalone]


#10647

FromJames Martin <james@northwoodlumber.com>
Date2017-06-05 17:07 -0400
Message-ID<oh4h0s$nes$1@dont-email.me>
In reply to#10642
Here is the section of GetData that doesn't work:

CASE nODBCType = AQL_NUMERIC .OR. nODBCType - SQL_DECIMAL
	nLen := oData:Length
	cVal := Mem2String( pTemp, nLen)
	xVal := Val( cVal )
	IF UsualType( xVal ) = FLOAT
		nDec := SELF:DataField( nIndex ):FieldSpec:Decimals
		xVal := Rpund( xVal, nDec)
	ENDIF
	FWrite(ptrHandle,AsString( xVal ) + TellASCI( cVal ) + Str (nDec ) + 
"[" + AsString(REAL8( pTemp )) + CRLF)
	RETURN xVal

The FWrite is my code. TellASCI() is also a function I wrote that 
converts the string to a series of ASCII numbers separated by bars. The 
file shows this for the number 162.25:

0  0|  0|254|255|  2|  0|173|115|  0|  0|  0|  0|  0|  0|  0| 
0[*************]

Any thoughts on how to proceed?

James

On 2017-06-03 10:58 AM, Jamal wrote:
> You need to write:
> 
> dVal  := REAL8( pTemp )      // pTemp is a PTR
> 
> ? AsString(dVal)
> 
> Also, you may have to dig deeper in the SDK especially __GetLongData()
> 
> Sorry, I cannot be more of help since I don’t deal with SQL from VO. 
> It's all C# and ASP.NET stuff.
> 
> Jamal
> 
> "James Martin"  wrote in message news:ogq1vn$55e$1@dont-email.me...
> 
> 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
>>>>>
>>>>
>>>
> 

[toc] | [prev] | [next] | [standalone]


#10648

FromJames Martin <james@northwoodlumber.com>
Date2017-06-05 17:13 -0400
Message-ID<oh4hb3$nes$2@dont-email.me>
In reply to#10642
I Nmade a mistake on the output:

0  0|  0|254|255|  2|  0|161|107|  0|  0|  0|  0|  0|  0|  0| 
0[*************]

James

On 2017-06-03 10:58 AM, Jamal wrote:
> You need to write:
> 
> dVal  := REAL8( pTemp )      // pTemp is a PTR
> 
> ? AsString(dVal)
> 
> Also, you may have to dig deeper in the SDK especially __GetLongData()
> 
> Sorry, I cannot be more of help since I don’t deal with SQL from VO. 
> It's all C# and ASP.NET stuff.
> 
> Jamal
> 
> "James Martin"  wrote in message news:ogq1vn$55e$1@dont-email.me...
> 
> 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
>>>>>
>>>>
>>>
> 

[toc] | [prev] | [next] | [standalone]


#10650

FromJames Martin <james@northwoodlumber.com>
Date2017-06-06 17:12 -0400
Message-ID<oh75kq$h0$1@dont-email.me>
In reply to#10642
I am getting output from my code. The ASCII codes are produced by:
cVal := Men2String(pTemp,nLen)
TellASCI(cVal)

TellASCI takes the string and character by character gives the ASCII 
code, and then returns a string of them. The input string is 15 
characters long and the output string is as follows:

0|  0|254|255|  2|  0| 16| 39|  0|  0|  0|  0|  0|  0|  0|

Only the 7th and 8th character change. For example the above was for 100

Can anybody figure out a pattern?

Number		ASCII codes

1		100,0
1.1		110,0
1.2		120,0
1.3		130,0
2		200,0
3		44,1
3.1		54,1
4		144,1
4.1		154,1
5		244,1
6		88,2
7		188,2
8		32,3
9		132,3
10		232,3
11		76,4
12		176,4
13		20,5
14		120,5
15		220,5
16		64,6
17		164,6
18		8,7
100		16,39
200		32,78
300		48,117
310		24,121
320		0,125
330		232,128

James

On 2017-06-03 10:58 AM, Jamal wrote:
> You need to write:
> 
> dVal  := REAL8( pTemp )      // pTemp is a PTR
> 
> ? AsString(dVal)
> 
> Also, you may have to dig deeper in the SDK especially __GetLongData()
> 
> Sorry, I cannot be more of help since I don’t deal with SQL from VO. 
> It's all C# and ASP.NET stuff.
> 
> Jamal
> 
> "James Martin"  wrote in message news:ogq1vn$55e$1@dont-email.me...
> 
> 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
>>>>>
>>>>
>>>
> 

[toc] | [prev] | [next] | [standalone]


#10651

FromJames Martin <james@northwoodlumber.com>
Date2017-06-06 17:19 -0400
Message-ID<oh7630$21q$1@dont-email.me>
In reply to#10650
I found it out!

(2.56 * 2nd number) + (1st number / 100)

Strange. I'll try this out.

James

On 2017-06-06 05:12 PM, James Martin wrote:
> I am getting output from my code. The ASCII codes are produced by:
> cVal := Men2String(pTemp,nLen)
> TellASCI(cVal)
> 
> TellASCI takes the string and character by character gives the ASCII 
> code, and then returns a string of them. The input string is 15 
> characters long and the output string is as follows:
> 
> 0|  0|254|255|  2|  0| 16| 39|  0|  0|  0|  0|  0|  0|  0|
> 
> Only the 7th and 8th character change. For example the above was for 100
> 
> Can anybody figure out a pattern?
> 
> Number        ASCII codes
> 
> 1        100,0
> 1.1        110,0
> 1.2        120,0
> 1.3        130,0
> 2        200,0
> 3        44,1
> 3.1        54,1
> 4        144,1
> 4.1        154,1
> 5        244,1
> 6        88,2
> 7        188,2
> 8        32,3
> 9        132,3
> 10        232,3
> 11        76,4
> 12        176,4
> 13        20,5
> 14        120,5
> 15        220,5
> 16        64,6
> 17        164,6
> 18        8,7
> 100        16,39
> 200        32,78
> 300        48,117
> 310        24,121
> 320        0,125
> 330        232,128
> 
> James
> 
> On 2017-06-03 10:58 AM, Jamal wrote:
>> You need to write:
>>
>> dVal  := REAL8( pTemp )      // pTemp is a PTR
>>
>> ? AsString(dVal)
>>
>> Also, you may have to dig deeper in the SDK especially __GetLongData()
>>
>> Sorry, I cannot be more of help since I don’t deal with SQL from VO. 
>> It's all C# and ASP.NET stuff.
>>
>> Jamal
>>
>> "James Martin"  wrote in message news:ogq1vn$55e$1@dont-email.me...
>>
>> 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
>>>>>>
>>>>>
>>>>
>>

[toc] | [prev] | [next] | [standalone]


#10660

FromJames Martin <james@northwoodlumber.com>
Date2017-06-08 10:02 -0400
Message-ID<ohbl7h$n05$1@dont-email.me>
In reply to#10651
This works:

LOCAL flVal as FLOAT

flVal := Asc(Substr(cVal,7,1))
xVal := (Asc(Substr(cVal,9,1)) * 655.36) + (Asc(Substr(cVal,8,1)) * 
2.56) + (flVal / 100)

RETURN xVal

This works for numbers up to 167119.35 and for 2 decimals.

At least we're going.

James

On 2017-06-06 05:19 PM, James Martin wrote:
> I found it out!
> 
> (2.56 * 2nd number) + (1st number / 100)
> 
> Strange. I'll try this out.
> 
> James
> 
> On 2017-06-06 05:12 PM, James Martin wrote:
>> I am getting output from my code. The ASCII codes are produced by:
>> cVal := Men2String(pTemp,nLen)
>> TellASCI(cVal)
>>
>> TellASCI takes the string and character by character gives the ASCII 
>> code, and then returns a string of them. The input string is 15 
>> characters long and the output string is as follows:
>>
>> 0|  0|254|255|  2|  0| 16| 39|  0|  0|  0|  0|  0|  0|  0|
>>
>> Only the 7th and 8th character change. For example the above was for 100
>>
>> Can anybody figure out a pattern?
>>
>> Number        ASCII codes
>>
>> 1        100,0
>> 1.1        110,0
>> 1.2        120,0
>> 1.3        130,0
>> 2        200,0
>> 3        44,1
>> 3.1        54,1
>> 4        144,1
>> 4.1        154,1
>> 5        244,1
>> 6        88,2
>> 7        188,2
>> 8        32,3
>> 9        132,3
>> 10        232,3
>> 11        76,4
>> 12        176,4
>> 13        20,5
>> 14        120,5
>> 15        220,5
>> 16        64,6
>> 17        164,6
>> 18        8,7
>> 100        16,39
>> 200        32,78
>> 300        48,117
>> 310        24,121
>> 320        0,125
>> 330        232,128
>>
>> James
>>
>> On 2017-06-03 10:58 AM, Jamal wrote:
>>> You need to write:
>>>
>>> dVal  := REAL8( pTemp )      // pTemp is a PTR
>>>
>>> ? AsString(dVal)
>>>
>>> Also, you may have to dig deeper in the SDK especially __GetLongData()
>>>
>>> Sorry, I cannot be more of help since I don’t deal with SQL from VO. 
>>> It's all C# and ASP.NET stuff.
>>>
>>> Jamal
>>>
>>> "James Martin"  wrote in message news:ogq1vn$55e$1@dont-email.me...
>>>
>>> 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
>>>>>>>
>>>>>>
>>>>>
>>>

[toc] | [prev] | [next] | [standalone]


#10657

FromJames Martin <james@northwoodlumber.com>
Date2017-06-08 08:13 -0400
Message-ID<ohbept$vbs$1@dont-email.me>
In reply to#10642
Need help again.

Asc(Substr(cVal,7,1))/100 doesn't work. Returns 0.
Val(Str(Asc(Substr(cVal,7,1))))/100 doesn't either. Also returns 0.

What I need to do is, for example, convert 64 to .64, 64 being the 
output of Asc()

James

On 2017-06-03 10:58 AM, Jamal wrote:
> You need to write:
> 
> dVal  := REAL8( pTemp )      // pTemp is a PTR
> 
> ? AsString(dVal)
> 
> Also, you may have to dig deeper in the SDK especially __GetLongData()
> 
> Sorry, I cannot be more of help since I don’t deal with SQL from VO. 
> It's all C# and ASP.NET stuff.
> 
> Jamal
> 
> "James Martin"  wrote in message news:ogq1vn$55e$1@dont-email.me...
> 
> 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
>>>>>
>>>>
>>>
> 

[toc] | [prev] | [next] | [standalone]


#10423

From"Karl-Heinz" <invalid@invalid.invalid>
Date2017-04-13 08:08 +0200
Message-ID<el8j1tFtc4oU1@mid.individual.net>
In reply to#10416
Hi James,

>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__"

__DEBUG__ is a reserved VO word, so you can´t define it. Whether "#ifdef
__DEBUG__" code is compiled or not depends on the internal "debug" setting.
You can change this setting at entity, modul or app-level. Just right click
in the repo at the desired location and select "Properties". -> debug on /
off
.
regards
Karl-Heinz 

[toc] | [prev] | [next] | [standalone]


#9880

FromPilks <richardp@lukhozi.co.za>
Date2016-11-01 08:03 -0700
Message-ID<87a0984e-1c3d-47e7-8fc4-1152e3179b71@googlegroups.com>
In reply to#9874
Martin

From what I remember CodeBase was a C library for C programmers to access dbf files.  The last version I saw as for dBase files (NDX indexes)  Did you try the NDX RDD?

May be wrong but it is what the old brain came up with when confronted with the name codebase.

Regards

Richard


On Friday, October 28, 2016 at 3:54:28 PM UTC+2, 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.
> 
> James

[toc] | [prev] | [next] | [standalone]


#9881

FromJames Martin <james@northwoodlumber.com>
Date2016-11-01 17:24 -0400
Message-ID<nvb15i$8b4$1@dont-email.me>
In reply to#9880
There are quite a number of DBFs. Some of them I can open via CDX, some 
NTX (but no index), and some not at all, if I access them directly.

But I would like to access them through the ODBC interface since there 
is less chance of data corruption.

You are right, it is a C library. The index extensions are CDX and FPT.

James

On 16-11-01 11:03 AM, Pilks wrote:
> Martin
>
> From what I remember CodeBase was a C library for C programmers to access dbf files.  The last version I saw as for dBase files (NDX indexes)  Did you try the NDX RDD?
>
> May be wrong but it is what the old brain came up with when confronted with the name codebase.
>
> Regards
>
> Richard
>
>
> On Friday, October 28, 2016 at 3:54:28 PM UTC+2, 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.
>>
>> James
>

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web