Re: foxpro, odbc, data types and unnecessary convertions

From: justin <justin(at)emproshunts(dot)com>
To: Fernando Moreno <azazel(dot)7(at)gmail(dot)com>
Cc: PostgreSQL pg-general List <pgsql-general(at)postgresql(dot)org>
Subject: Re: foxpro, odbc, data types and unnecessary convertions
Date: 2009-02-26 17:23:50
Message-ID: 49A6D026.4040704@emproshunts.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Completely forgot take a look at Cursor Adapter Class, also any cursor
in foxpro can be made be updateable with CURSORSETPROP( ) function
removing the problem of writing Update's and Inserts

Fernando Moreno wrote:
> Hi all, I'm using visual foxpro 9 -not my decision- for a client
> application. Statements are writen as the typical sql string and sent
> through ODBC.
>
> For numbers, I have to convert them first to string and then remove
> the spaces, the code looks like this: sql_string = "some sql" +
> alltrim( str( some_number ) ) + " more sql"; I can combine alltrim and
> str in a third function but it's still tricky. A shorter and
> presumably better way to do the same is: sql_string = "some_column =
> ?foxpro_variable ". The problem with the last option is that, watching
> the pgsql log, values are sent this way: '12345'::float(8), so for
> every numeric value, no matter its type, I'm sending 12 characters
> more and the server is doing convertions that I don't need.
>
> Having a lot of foreign keys and other numeric data, I think this
> behaviour is not so good for network (remote and poor connection) and
> server performance. I'm almost decided to keep doing the trim/str
> thing, but my question is: am I exaggerating? what would you do?
>
> Thanks.
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2009-02-26 17:27:04 Re: Off Topic: ICD-10 codes in a database table?
Previous Message John R Pierce 2009-02-26 17:18:28 Re: postgresql with storage