Problem updating multiline varchar with VB6 and ODBC - Mailing list pgsql-odbc

From Guillaume Lelarge
Subject Problem updating multiline varchar with VB6 and ODBC
Date
Msg-id 243D6CC9E43AD311BD3400805F65143755E84E@NT3.progi.loc
Whole thread Raw
List pgsql-odbc
Hi everyone,

My postgresql 7.1.3 server is installed on a linux system.
I use a VB6 app to collect and update datas through ODBC. I use the last
ODBC driver release (07_01_0010). I think the 07_02_0001 driver is for
7.2.x server, but correct me if I am wrong.
I have problems when I try to update a row with this VB app.

Here is an example of my source:
==========
Dim sSQL as String
Dim sConnection as String
Dim myConnection As rdoConnection
Dim myEnvironment As rdoEnvironment
Dim myResultSet as rdoResultSet
Dim bDirty as Boolean

myEnvironment.CursorDriver = rdUseOdbc
Set myConnection = myEnvironment.OpenConnection("",
rdDriverCompleteRequired, False, sConnection)
myConnection.QueryTimeout = 120
sConnection = myConnection.Connect
sSQL = "SELECT  * FROM table_name WHERE id_table=" & id_value
Set myResultSet = myConnection.OpenResultset(sSQL, rdOpenKeyset,
rdConcurRowVer)
If bDirty Then
  myResultSet.Edit
  myResultSet("column_name").value = column_value
  myResultSet.Update
End If
==========

This code works great... near every time.
I have problems when one of the column's type is a varchar and when its
value contains several lines. I can see in the log that the driver
doesn't find the row to update. Does it have to do with LFCR
translation?

Is my code wrong? or my settings??
Or does the driver have some problems with multiline varchar fields?


Thanks in advance.

--
Guillaume.


pgsql-odbc by date:

Previous
From: "Dave Page"
Date:
Subject: Re: Version info
Next
From: "Edward Grabczewski"
Date:
Subject: accessing BLOBs via ODBC