Problem updating multiline varchar with VB6 and ODBC

From: Guillaume Lelarge <guillaume(dot)lelarge(at)progimed(dot)fr>
To: "'pgsql-odbc(at)postgresql(dot)org'" <pgsql-odbc(at)postgresql(dot)org>
Subject: Problem updating multiline varchar with VB6 and ODBC
Date: 2002-07-22 09:05:27
Message-ID: 243D6CC9E43AD311BD3400805F65143755E84E@NT3.progi.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Patrick Hatcher 2002-07-22 23:08:21 What is Cancel as FreeStmt?
Previous Message Edward Grabczewski 2002-07-20 08:55:41 accessing BLOBs via ODBC