Re: TEXT datatype and VB6...

From: Dennis Gearon <gearond(at)cvc(dot)net>
To: Andrew Ayers <aayers(at)eldocomp(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: TEXT datatype and VB6...
Date: 2003-03-25 19:39:46
Message-ID: 3E80B082.6010601@cvc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

microsoft code has a habit of having little nagging problems like this, like,
"Oh yeah, you need to make sure to add a space before a command,it's the
microsoft way"

Not meaning to bash, but I HAD to do some VB programming to access some oracle
stuff and do a web page in a class, and the logic and reasoning behind little,
extra characters one had to add in queries just galled me, WHY? <grrrr>

Not much help to you, I know.

I do believe that you're going to find that VB has trouble with that text field,
and my (just now) intuition is because it can't handle a variable that has a
variable length,without some special effects.

Andrew Ayers wrote:
> I am posting this to clarify my last email about it:
>
> First off, this is only happenning when I perform the following sequence
> in my VB code:
>
> Open PGSQL Database (via DSN-less ODBC connection, using psqlODBC driver)
> Select Recordset
>
> With Recordset
> .AddNew
> ![Field] = "blah" ' Field is a TEXT-type field on the pgsql table
> ![Field] = "blah" ' Error occurs here
> .Update
> End With
>
> Close Recordset
> Close Database
>
> ---
>
> If instead of the .AddNew, I do a .Edit (on a pre-existing record I have
> selected), it works OK. It also works OK if the field is of a type other
> than TEXT - ie, VARCHAR().
>
> If I do a single "update" of the field with the .AddNew:
>
> With Recordset
> .AddNew
> ![Field] = "blah"
> .Update
> End With
>
> ...the record is added fine.
>
> Does anyone here suspect a problem with the ODBC driver?
>
> I also cannot entertain suggestions of recoding the app to use ADO, RDO,
> or SQL INSERT statements, etc - mainly because it is a large legacy
> application heavily invested in DAO (the reason for moving from Access
> 97 to PostgreSQL is so that a rewrite of the application, in something
> other than VB, can be accomplished, while still allowing the current
> application to function and update the new DB).
>
> Thank you,
>
> Andrew
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Luc Lachance 2003-03-25 20:27:53 Re: trigger question.
Previous Message Andrew Ayers 2003-03-25 18:55:32 Re: TEXT datatype and VB6...